Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/testpointcorp/robot-vansah
This tutorial guides you through the process of integrating Robot Framework with Vansah Test Management for Jira to automatically send your test case results.
https://github.com/testpointcorp/robot-vansah
automation automation-testing integration-testing robotframework vansah
Last synced: about 1 month ago
JSON representation
This tutorial guides you through the process of integrating Robot Framework with Vansah Test Management for Jira to automatically send your test case results.
- Host: GitHub
- URL: https://github.com/testpointcorp/robot-vansah
- Owner: testpointcorp
- Created: 2024-04-23T10:57:34.000Z (7 months ago)
- Default Branch: prod
- Last Pushed: 2024-07-30T10:06:28.000Z (4 months ago)
- Last Synced: 2024-09-27T10:41:26.726Z (about 2 months ago)
- Topics: automation, automation-testing, integration-testing, robotframework, vansah
- Language: Python
- Homepage: https://vansah.com/connect-integrations/
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Robot Framework Integration with Vansah Test Management For Jira
This tutorial guides you through the process of integrating Robot Framework with Vansah Test Management for Jira to automatically send your test case results.By following this setup, you can streamline your testing workflow, ensuring that test outcomes are recorded directly in your Jira workspace.
## Prerequisites
- Robot Framework - [Test](https://robotframework.org/#getting-started) project is already setup.
- Make sure that [`Vansah`](https://marketplace.atlassian.com/apps/1224250/vansah-test-management-for-jira?tab=overview&hosting=cloud) is installed in your Jira workspace
- You need to Generate **Vansah** [`connect`](https://docs.vansah.com/docs-base/generate-a-vansah-api-token-from-jira-cloud/) token to authenticate with Vansah APIs.
## Configuration
**Setting Environment Variables** - Store your Vansah API token as an environment variable for security.For Windows (use cmd)
```cmd
setx VANSAH_TOKEN "your_vansah_api_token_here"```
For macOS
```bash
echo export VANSAH_TOKEN="your_vansah_api_token_here" >> ~/.bash_profilesource ~/.bash_profile
```
For Linux (Ubuntu, Debian, etc.)
```bash
echo export VANSAH_TOKEN="your_vansah_api_token_here" >> ~/.bashrcsource ~/.bashrc
```
## Implementation
To enable Vansah Integration in Robot Framework project, follow these steps:### Create Variables for Tests
1. ${AssetKey} is required to declare under variables section - can be empty
2. ${TestCaseKey} is required to declare under variables section - can be empty
3. ${SprintName}, ${ReleaseName} and ${EnvironmentName} Test Run properties values are optional.```js
*** Variables ***
${AssetKey} Test-3
${TestCaseKey}
${SprintName} SM Sprint 1
${ReleaseName} Release 24
${EnvironmentName} UAT
```Note : Variables are case sensitive
### Add `Set Test Variable` in each of your Test Cases
```js
*** Test Cases ***Open Google Search Page 1
Open Browser To view Google Page
[Teardown] Close Browser
Set Test Variable ${TestCaseKey} Test-C10 //This is required
Set Test Variable ${AssetKey} Test-3 //This is required
```### Add [`ListenerClass.py`](/libraries/ListenerClass.py) and [`VansahBinding.py`](/libraries/VansahBinding.py) to your libraries folder
If your Vansah is pinned to any other location than US, please use :
```js
//ListenerClass.pyvansahBind = VansahBinding()
// After line number : 18 in your ListenerClass.py add below code to update the Vansah URLvansah.setVansahURL("Add your Vansah Connect URL")
```### Running your Test with the ListenerClass.py
Use below command to run your tests
```cmd
robot --listener .\libraries\ListenerClass.py test
```Output : `Vansah Response : A new Test Run created.`
```js
C:\Users\onesh\..\GitHub\robot-vansah> robot --listener .\libraries\ListenerClass.py test
==============================================================================
Test
==============================================================================
Test.Testsuite Functional
==============================================================================
Open Google Search Page 1
DevTools listening on ws://127.0.0.1:51936/devtools/browser/6dba13bd-1197-4656-96a7-1d13dbdc67d8
....
Vansah Response : A new Test Run created.
Open Google Search Page 1 | PASS |
------------------------------------------------------------------------------
Open Google Search Page 2
DevTools listening on ws://127.0.0.1:51961/devtools/browser/ae132c3b-50ab-4560-b85b-c2b08960a157
....
Vansah Response : A new Test Run created.
Open Google Search Page 2 | PASS |
------------------------------------------------------------------------------
Test.Testsuite Functional | PASS |
2 tests, 2 passed, 0 failed
==============================================================================
Test | PASS |
2 tests, 2 passed, 0 failed
```### Conclusion
By following the above steps, your Robot Framework project will be equipped to send test run results directly to Vansah, streamlining your testing and reporting process.Ensure that all files are placed and configured as described to facilitate successful integration.
For more details on Robot Framework, visit the [docs](https://robotframework.org/#getting-started).
For Vansah specific configurations and API details, please refer to the [Vansah API documentation](https://apidoc.vansah.com/).