zoukankan      html  css  js  c++  java
  • cumber + selenium +java自动化测试

    1、新建一个maven项目,pom文件为:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
    
      <groupId>com.test</groupId>
      <artifactId>cucumber</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <packaging>jar</packaging>
    
      <name>cucumber</name>
      <url>http://maven.apache.org</url>
    
        <properties>  
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
        </properties>  
        <dependencies>  
            <dependency>  
                <groupId>info.cukes</groupId>  
                <artifactId>cucumber-core</artifactId>  
                <version>1.2.3</version>  
            </dependency>  
            <dependency>  
                <groupId>info.cukes</groupId>  
                <artifactId>cucumber-java</artifactId>  
                <version>1.2.3</version>  
            </dependency>  
            <dependency>  
                <groupId>junit</groupId>  
                <artifactId>junit</artifactId>  
                <version>4.12</version>  
            </dependency>  
            <dependency>  
                <groupId>info.cukes</groupId>  
                <artifactId>cucumber-junit</artifactId>  
                <version>1.2.3</version>  
            </dependency>  
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>2.48.2</version>
            </dependency> 
            <dependency>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-surefire-plugin</artifactId>  
                <version>2.12.4</version>  
            </dependency>  
            <dependency>  
                <groupId>org.picocontainer</groupId>  
                <artifactId>picocontainer</artifactId>  
                <version>2.14</version>  
            </dependency>  
            <dependency>  
                <groupId>info.cukes</groupId>  
                <artifactId>cucumber-picocontainer</artifactId>  
                <version>1.2.3</version>  
            </dependency>  
        </dependencies>  
        <build>  
            <plugins>  
                <plugin>  
                    <groupId>org.apache.maven.plugins</groupId>  
                    <artifactId>maven-surefire-plugin</artifactId>  
                    <configuration>  
                        <forkMode>once</forkMode>  
                        <argLine>-Dfile.encoding=UTF-8</argLine>  
                    </configuration>  
                </plugin>  
            </plugins>  
        </build>  
      
    </project>  

    http://blog.csdn.net/yan1234abcd/article/details/49300995

  • 相关阅读:
    Mybatis之批量更新操作
    Spring Quartz *.QRTZ_LOCKS' doesn't exist
    分析NTFS文件系统得到特定文件的内容
    设计模式笔记——设计模式原则总结
    android自己定义ViewPager之——3D效果应用
    Android混淆代码
    百度地图 Android SDK
    NYOJ17,单调递增最长子序列
    令人纠结的两行代码
    XCode中在提示窗体中对已弃用的API接口画上红线
  • 原文地址:https://www.cnblogs.com/testway/p/6060232.html
Copyright © 2011-2022 走看看