Prerequisites:
- Download the Subject7 automation package here
- The package is just a folder full of jar files required by Maven or Ant.
- Make sure the lib folder is added to the classpath.
Sample build.xml file
<project name="proof_tests" basedir=".">
<property file="build.properties"/>
<taskdef name="automation_test_task"
classname="com.subject7.automation.AutomationTestAntTask">
<classpath>
<fileset dir="./subject7_automation_lib" includes="**/*.jar"/>
</classpath>
</taskdef>
<target name="suject7_cloud_run">
<automation_test_task>
<configuration providerUrl="${BASE_URL}"
username="${USER}"
password="${PASS}"
build="${BUILD_NUMBER}"
timeout="${TIMEOUT}"
delay="${DELAY}"
sync="${SYNC}"
reportPath="./execution_reports"
outFormat="html"
continueOnError="${CONTINUE_ON_ERROR}">
<executionSet name="smoke_tests"
browserType="CHROME;FIRE_FOX"
pool="default"
rotation="1">
<dataSetSelection templateName="template_used_in_test_case1"
testCaseName="test_case1">
<dataSet name="data_set_to_replace_template_in_test_case_1"/>
</dataSetSelection>
</executionSet>
</configuration>
</automation_test_task>
</target>
</project>
Sample build.properties:
#build properties
BASE_URL=https://platform.subject-7.com
USER=subject7_user
PASS=subject7_password
TIMEOUT=180
DELAY=0
SYNC=true
ONTINUE_ON_ERROR=false
Parameters definition:
BASE_URL: Points to Subject7 installation. If using the cloud version just use https://platform.subject-7.com otherwise, use your on-prem private URL.
USER: Subject7 username
PASS: Subject7 password
Timeout (s): Number of seconds before the build waits for automation tests to complete. If it reaches more, the build will fail.
Sync Execution: If checked, the build will not complete until all test cases are passed in the provided Execution Set or we reach the timeout parameter. If not checked, the build will continue without waiting for the result.
Report Format: The test execution report returned in Jenkins can be in HTML or in JSON format. You can also see the detail report by logging into the platform and search for your build
Build Number: Optional parameter. If your Jenkins generates build numbers you can use ${BUILD_NUMBER}. This is just metadata and it will show up in the execution reports and can be used for tracking purposes.
Delay (s): Number of seconds to wait before starting to execute the tests. Sometimes, deployments take a little longer because they depend on 3rd party system outside of the build process control and hence waiting is required.
Execution Set Name: The name of the execution set you want to execute
Comments
Please sign in to leave a comment.