Integrating SoliteraTA Command Line with Jenkins and Cucumber Reports – SoliteraTA

SoliteraTA

Integrating SoliteraTA Command Line with Jenkins and Cucumber Reports

Introduction: #

The SoliteraTA tool can integrate with Jenkins to run the test cases as soon as a build is created.

Pre-requisites: #

  1. Jenkins installed on your system.
  2. Jenkins installed with the same user as SoliteraTA is installed with.
  3. SoliteraTA Command Line Interface (CLI) command.
  4. Local security policy must be installed on user pc, use this link if not foud:https://www.itechtics.com/enable-gpedit-windows-10-home/
  5. Log on as a service enabled for users.

Steps for Integration: #

  1. Configure SoliteraTA CLI in Jenkins
    • Open Jenkins and navigate to the job you want to configure.
    • Click “Configure” to modify the job settings.
    • —————————————-OR———————————-
    • Create a new item as a free style project.
    • Provide a name to the job
  2. Add Build Step for STA CLI
    • In the Build section, click “Add build step”.
    • Select “Execute Windows batch command” or “Execute shell” based on your operating system.
    • Enter the command to run your SoliteraTA tests. For example:
    • C:/Program Files/SoliteraTA/SoliteraTA.exe” cli -executionLocation=”C:\\Users\\HP\\Documents\\soliteraTaProjectsUpdated\\SoliteraTA_Playground\\executionData” -elementFilePath=C:\\Users\\HP\\Documents\\soliteraTaProjectsUpdated\\SoliteraTA_Playground\\Default_Release\\element\\Element.env -applicationFilePath=C:\\Users\\HP\\Documents\\soliteraTaProjectsUpdated\\SoliteraTA_Playground\\Default_Release\\application\\Environment.env -testdataFilePath=C:\\Users\\HP\\Documents\\soliteraTaProjectsUpdated\\SoliteraTA_Playground\\Default_Release\\test_data\\Test_Data.env -scriptFolderPath=C:\\Users\\HP\\Documents\\soliteraTaProjectsUpdated\\SoliteraTA_Playground\\scripts\\Alert_Events -executionName=abc
    • Refer to complete documentation of CLI over here: https://soliterata.com/docs/command-line-interface/soliterata-command-line-interface-cli/
  3. Install Cucumber Reports Plugin
    • Go back to the job configuration page.
    • Scroll down to “Post-build Actions”.
    • Click “Add post-build action” and select “Cucumber report”.
    • In the ” JSON Reports Path”, specify the JSON report file path generated by STA CLI (This will be the same as the path you pass in CLI as an execution folder. For example:
    • C:\Users\HP\Documents\soliteraTaProjectsUpdated\SoliteraTA_Playground\executionData\abc\report\Configure additional settings like trends and advanced options as needed.
    • Configure your other conditions as when the test report is to be passed with other settings.
  4. Add Post-build Action for Cucumber Reports
    • Go back to the job configuration page.
    • Scroll down to “Post-build Actions”.
    • Click “Add post-build action” and select “Cucumber report”.
    • In the ” JSON Reports Path”, specify the JSON report file path generated by STA CLI (This will be the same as the path you pass in CLI as an execution folder. For example:
    • C:\Users\HP\Documents\soliteraTaProjectsUpdated\SoliteraTA_Playground\executionData\abc\report\Configure additional settings like trends and advanced options as needed.
    • Configure your other conditions as when the test report is to be passed with other settings.
  5. Save Configuration and Run Job
    • Click “Apply” and “Save” to preserve your job configuration.
    • Run your job to see the test execution and report generation.

Viewing Reports: #

  1. After the build completes, click on the job in Jenkins.
  2. You should see a “Cucumber Reports” link in the menu. Click on it to view detailed test results.

Troubleshooting: #

  1. If reports are not showing, check the console output for any errors regarding report generation.
  2. Ensure the JSON file path is correct and accessible to Jenkins.

Solitera may collect certain information by automated means, such as cookies and web beacons, when a user visits our website. A “cookie” is a small piece of data that a website can send to your browser, which may then be stored on your system. learn more

Choose your Operating System