• 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

  • 相关阅读:
    洛谷 P4708
    NFLSOJ 1060
    Codeforces 1264D
    Solution -「多校联训」Sample
    Solution -「多校联训」光影交错
    Solution -「LOJ #138」「模板」类欧几里得算法
    Solution -「LOJ #141」回文子串 ||「模板」双向 PAM
    Codeforces Round #700 (Div. 2)
    Codeforces Round #698 (Div. 2) C and D
    「NOI 2021」题解
  • 原文地址:https://www.cnblogs.com/testway/p/6060232.html
Copyright © 2020-2023  润新知