Jenkins实战总结

最近给公司搭了个jenkins做CI,步骤总结如下:

1.1 How to use jerkins to trigger an automation test on B2C

  1. http://10.196.16.210:8080/
  2. Click  build now

                       

  1. You can see the new build is starting.

 

 

 

  1. After the build is finished , click the build link url

 

 

 

  1. Console out is for the test run log
  2. Cucumber report is the detail report for the selenium run result.

 

 

1.2 How to config  Jenkins for a cucumber task?

       1.2.1.  http://10.196.16.210:8080/

                Jenkins->Plugin Manager   Install Maven Integration plugin

       1.2.2    In the Global Tool Configuration, fill in the maven info, eg.

               

Also the JKD info:

 

 

1.2.3   Configure System

           Click the Configure System

     Config Jenkins location

     Fill in the part for “Extended E-mail Notification”

       

Do remember to check the options for the Default Trigger

 

1.2.4  Now time to create a new project , click new item and choose Maven project

 

Proceed to the next page and fill the Source Code Management

 

 

Two tasks added after Post-build Actions :  Cucumber reports and Editable Email Notification.

 

 

 

Some maven info:

Maven running cucumber command

 

mvn test -Dcucumber.options="--tags @smoke"

 

mvn test -Dcucumber.options="--help"
 

mvn install:install-file -DgroupId="com.oracle" -DartifactId=ojdbc12 -Dversion="12.1.0.1" -Dpackaging=jar -Dfile="D:\B2CGit\Libraries4Automation\selenium-2.53.1\libs\ojdbc6-12.1.0.1-atlassian-hosted.jar" -DgeneratePom=true

 

<dependency>

                <groupId>com.oracle</groupId>

                <artifactId>ojdbc12</artifactId>

                <version>12.1.0.2</version>

           </dependency>

 

Installl Maven:

Check environment variable value e.g.

echo %JAVA_HOME%  (I used C:\Program Files\Java\jdk1.8.0_144)

Adding to PATH: Add the unpacked distribution’s bin directory to your user PATH environment variable by opening up the system properties (WinKey + Pause), selecting the “Advanced” tab, and the “Environment Variables” button, then adding or selecting the PATH variable in the user variables with the value D:\apache-maven-3.5.3\bin. The same dialog can be used to set JAVA_HOME to the location of your JDK, e.g. C:\Program Files\Java\jdk1.8.0_144

Open a new command prompt (Winkey + R then type cmd) and run mvn -v to verify the installation.

Reference Link: http://maven.apache.org/install.html

转载于:https://www.cnblogs.com/luckylisa/p/9019640.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值