Skip to content

Commit

Permalink
Merge pull request #9 from Scot3004/use-existing-run
Browse files Browse the repository at this point in the history
Use existing run for testrail report
  • Loading branch information
Damian Osipiuk authored Aug 6, 2020
2 parents 7eab5ad + 2adfb85 commit b6e3a33
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 54 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,22 @@ Configuration can be provided via:
- ENV variables
- configuration file (.testrailrc)

| ENV Variable | Config | Description | Default | Required |
| ----------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------: | :------: |
| TESTRAIL_ENABLED | enabled | Enables TestRail integration. | `false` | |
| TESTRAIL_HOST | host | URL of the TestRail instance. | | `true` |
| TESTRAIL_USER | user | Account name which will be used to push results. | | `true` |
| TESTRAIL_API_KEY | apiKey | API key which can be generated on the profile page in TestRail. | | `true` |
| TESTRAIL_PROJECT_ID | projectId | Project id in which test cases are stored. Ex. `P123` | | `true` |
| TESTRAIL_SUITE_ID | suiteId | Suite id in which test cases are stored. Ex. `S123` | | `true` |
| TESTRAIL_CASE_META | caseMeta | Meta attribute to be used to get TestRail case id mapping. | `'CID'` | |
| TESTRAIL_RUN_NAME | runName | Test Run name. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li><li>`%DATE%` - see config option `dateFormat`</li></ul> | `%BRANCH%#%BUILD% - %DATE%` | |
| TESTRAIL_RUN_DESCRIPTION | runDescription | You can provide you own Test Run description. If this option is not configured, it will contain test results and test coverage. | | |
| TESTRAIL_REFERENCE | reference | String that will be added to the `refs` field in TestRail. This can enable integration with other tools like https://github.com/DamianOsipiuk/jest-reporter-testrail/. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li></ul> | | |
| TESTRAIL_BRANCH_ENV | branchEnv | Which ENV variable is used to store branch name on which tests are run. | `BRANCH` | |
| TESTRAIL_BUILD_NO_ENV | buildNoEnv | Which ENV variable is used to store build number of tests run. | `BUILD_NUMBER` | |
| TESTRAIL_DATE_FORMAT | dateFormat | What date format should be used for `%DATE%` placeholder. https://momentjs.com/ formats supported. | `YYYY-MM-DD HH:mm:ss` | |
| TESTRAIL_RUN_CLOSE_AFTER_DAYS | runCloseAfterDays | After how many days should reporter close old Runs in testrail. | | |
| TESTRAIL_UPLOAD_SCREENSHOTS | uploadScreenshots | Should upload screenshots to testrail. Requires test result edit enabled in testrail. | `false` | |
| ENV Variable | Config | Description | Default | Required |
| ------------------------------ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------: | :------: |
| TESTRAIL_ENABLED | enabled | Enables TestRail integration. | `false` | |
| TESTRAIL_HOST | host | URL of the TestRail instance. | | `true` |
| TESTRAIL_USER | user | Account name which will be used to push results. | | `true` |
| TESTRAIL_API_KEY | apiKey | API key which can be generated on the profile page in TestRail. | | `true` |
| TESTRAIL_PROJECT_ID | projectId | Project id in which test cases are stored. Ex. `P123` | | `true` |
| TESTRAIL_SUITE_ID | suiteId | Suite id in which test cases are stored. Ex. `S123` | | `true` |
| TESTRAIL_RUN_ID | runId | Run id which test cases are stored. Ex `R123` | | |
| TESTRAIL_CASE_META | caseMeta | Meta attribute to be used to get TestRail case id mapping. | `'CID'` | |
| TESTRAIL_RUN_NAME | runName | Test Run name. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li><li>`%DATE%` - see config option `dateFormat`</li></ul> | `%BRANCH%#%BUILD% - %DATE%` | |
| TESTRAIL_RUN_DESCRIPTION | runDescription | You can provide you own Test Run description. If this option is not configured, it will contain test results and test coverage. | | |
| TESTRAIL_REFERENCE | reference | String that will be added to the `refs` field in TestRail. This can enable integration with other tools like https://github.com/DamianOsipiuk/jest-reporter-testrail/. Configurable with variables <ul><li>`%BRANCH%` - see config option `branchEnv`</li><li>`%BUILD%` - see config option `buildNoEnv`</li></ul> | | |
| TESTRAIL_BRANCH_ENV | branchEnv | Which ENV variable is used to store branch name on which tests are run. | `BRANCH` | |
| TESTRAIL_BUILD_NO_ENV | buildNoEnv | Which ENV variable is used to store build number of tests run. | `BUILD_NUMBER` | |
| TESTRAIL_DATE_FORMAT | dateFormat | What date format should be used for `%DATE%` placeholder. https://momentjs.com/ formats supported. | `YYYY-MM-DD HH:mm:ss` | |
| TESTRAIL_RUN_CLOSE_AFTER_DAYS | runCloseAfterDays | After how many days should reporter close old Runs in testrail. | | |
| TESTRAIL_UPLOAD_SCREENSHOTS | uploadScreenshots | Should upload screenshots to testrail. Requires test result edit enabled in testrail. | `false` | |
| TESTRAIL_UPDATE_RUN_TEST_CASES | updateRunTestCases | Tells to the reporting tool to no create or update the given test run, you need to create the mapping for the testcases manually | `true` | |
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testcafe-reporter-testrail",
"version": "0.6.0",
"version": "0.6.1",
"description": "Testcafe reporter plugin that automatically publishes test run details to the TestRail system.",
"main": "lib/index.js",
"files": [
Expand Down
Loading

0 comments on commit b6e3a33

Please sign in to comment.