Selenium Integration with Jenkins
Posted by Mufi on 7:41 AM with No comments
Operate PushToTest TestMaker tests from Continuous Integration environments. PushToTest checks TestMaker compatibility with Hudson and Bamboo.
TestMaker Version : 5.5 RC3
Bamboo Version : 2.6.2 (Standalone)
Hudson Version : 1.374
Java Verison : 1.6 (1.6.18 or later)
Tomcat Verison : 6.0.26 (To run Hudson)
Bamboo Version : 2.6.2 (Standalone)
Hudson Version : 1.374
Java Verison : 1.6 (1.6.18 or later)
Tomcat Verison : 6.0.26 (To run Hudson)
Setup a build in Hudson:
Hudson comes with a web archive file (hudson.war). You need a web server (tomcat/jboss/jetty) to run Hudson.
Tomcat Console (runs in 8090 http port)
Hudson Home URL: http://localhost:8090/hudson/
Create New Job link to create a new Job
Click OK to proceed
You can select Source Code Management option to checkout the code from (CVS/Subversion). All the source/tests will checkout in the build workspace directory.
Select Execute Windows build Command from the Build
Type the following command
%TESTMAKER_HOME%\TestMaker.cmd -t example_agents\AjaxRIASeleniumTest_Tutorial\Calendar_Functional_Test.scenario -log-junit testreport\junitreport.xml
Note: The scenario file path (example_agents\AjaxRIASeleniumTest_Tutorial\Calendar_Functional_Test.scenario) and reports path (testreport\junitreport.xml
) is relative to your build workspace.
Click Save.
Pre-requisite to execute the build:
Create Environment variables:
Create the below two environment variables in Hudson Console (Hudson -> Manage Hudson -> Configure Your System -> Global Properties) as shown below:
JAVA_HOME
TESTMAKER_HOME
Or you can create these two system environment variables (My computer -> Advanced -> Environment Variables)
Start TestNode:
If required, start the Testmaker testnode. The current example is using the local testnode which runs in 8080 http port.
Testnode console
Execute the build in Hudson:
Click on Build Now link available in the left side to start the build
Due to some reason, the first build failed, so I ran the build for the second time.
You can watch the logs by clicking the build link
Click on the Console output
In the meantime, you can watch the testnode logs:
Configure the build/test output to detect failures in Junit output:
Check the Publish JUnit test result report option from the Post-build Actions
Note: You may not have the report file for the first time build. So, do not select this option until unless you have the report file (junitreport.xml) available in the specified directory.
Click on the Test Result
Setup a build in Hudson:
Same as windows - Please refer windows section
You can select Source Code Management option to checkout the code from (CVS/Subversion). All the source/tests will checkout in the build workspace directory.
Select Execute Shell from the Build
Type the following command
$TESTMAKER_HOME/TestMaker.sh -t example_agents/AjaxRIASeleniumTest_Tutorial/Calendar_Functional_Test.scenario -log-junit testreport/junitreport.xml
Note: The scenario file path (example_agents/AjaxRIASeleniumTest_Tutorial/Calendar_Functional_Test.scenario) and reports path (testreport/junitreport.xml
) is relative to your build workspace.
Make sure the / , $, TestMaker.sh
Click Save.
Pre-requisite to execute the build:
Create Environment variables:
--Same as Windows
But only the Path is going to change. It has to be valid unix path.
Start the TestNode:
--Same as Windows
Execute the build in Hudson:
--Same as Windows
Configure the build/test output to detect failures in Junit output:
--Same as Windows
0 comments:
Post a Comment