This is sample cucumber + selenium project in Ruby. It shows how to upload test result file on JIRA instance using QMetry for JIRA - Test Management.
Supported Ruby Version - 2.0+
We are using these custom modules : selenium-webdriver, rest-client, json.
We have preconfigured ruby to automatically run gems so we can simply do:
gem install selenium-webdriver rest-client json
You need to install geckodriver to run test on Mozilla. Then extract the downloaded file in a directory in the PATH.
First you need to provide few details in Steps file. features > step_definitions > search_steps.rb.
- Select type of JIRA hosting - Cloud Or Server/On Premise/Data Center.
- Provide API key. You can get this value by logging inro your JIRA instance. Click on QMetry Menu on top -> Automation API. Here you can get API key of your selected project.
- If your JIRA hosting type is Server/Data Center then you need to set JIRA username and passoword too for REST API access.
- And finally QMetry automation API URL - This value is also present in Automation API page.
After providing these details, you are ready to start test.
cucumber --format json_pretty > cucumber.json
It will generate cucumber.json test result file.
Addionally, right after test completion, test result file will be uploaded on your JIRA instance.