summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 04:33:59 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 04:33:59 +0000
commit6596dd7f46ded2196e6e93d8cb3e5cdbf22d5985 (patch)
treeae99736af2817992c4ec4277dcb819ee12d98f34
parent5d8b276533a52c30f3b582a4a791438c615d5a20 (diff)
automatic import of python-behave-testrail-reporteropeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-behave-testrail-reporter.spec565
-rw-r--r--sources1
3 files changed, 567 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..3ec52b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/behave-testrail-reporter-0.5.1.tar.gz
diff --git a/python-behave-testrail-reporter.spec b/python-behave-testrail-reporter.spec
new file mode 100644
index 0000000..083bf96
--- /dev/null
+++ b/python-behave-testrail-reporter.spec
@@ -0,0 +1,565 @@
+%global _empty_manifest_terminate_build 0
+Name: python-behave-testrail-reporter
+Version: 0.5.1
+Release: 1
+Summary: Behave library to integrate with Testrail API
+License: MIT
+URL: https://github.com/virtualstock/behave-testrail-reporter/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e4/1d/5ecff596161601dda81a7d7057c48b9733e846eb48fce598e22e7bbe6398/behave-testrail-reporter-0.5.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-jsonschema
+Requires: python3-behave
+Requires: python3-pyyaml
+Requires: python3-requests
+
+%description
+# Behave to TestRail Reporter
+
+
+[![CircleCI](https://circleci.com/gh/Virtualstock/behave-testrail-reporter.svg?style=svg)](https://circleci.com/gh/Virtualstock/behave-testrail-reporter)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Virtualstock/behave-testrail-reporter&amp;utm_campaign=Badge_Grade)
+[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&utm_medium=referral&utm_content=Virtualstock/behave-testrail-reporter&utm_campaign=Badge_Coverage)
+[![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge)
+
+This integration is used to add test results to TestRail automatically when Behave tests are executed.
+
+
+Example of the generated report:
+
+```
+3 testrail test cases passed, 0 failed, 19 skipped, 2 untested
+Took 0m6.349s
+```
+
+## Install
+
+Can install it using pipenv
+
+```
+$ pipenv install behave-testrail-reporter
+```
+
+or using pip
+
+```
+$ pip install behave-testrail-reporter
+```
+
+## Setup
+
+Add `TestrailReporter` to behave reporters in your `/features/environment.py` by adding this code in `before_all()`
+
+```python
+from behave_testrail_reporter import TestrailReporter
+
+def before_all(context):
+ # ... all your other awesome code in here
+ current_branch = os.environ.get('CIRCLE_BRANCH') # Change this to get the current build branch of your CI system
+ testrail_reporter = TestrailReporter(current_branch)
+ context.config.reporters.append(testrail_reporter)
+```
+
+
+Create a `testrail.yml` config file in the root of your project
+
+
+Example structure:
+
+
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Advanced tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+ - name: 'Smoke tests on branch {branch}'
+ id: 1234
+ suite_id: 789
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+```
+
+Allow only **master** branch and **release1.111.1** to push test results to Testrail:
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Full E2E tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ allowed_branch_pattern: '^(master|release\/\d+([\.\d]+)?)$'
+```
+
+| yaml key | Description |
+| ---------------------- | ---------------------------------------------------------- |
+| name | Project name |
+| id | Testrail project id |
+| suite_id | Testrail Suite id |
+| allowed_branch_pattern | Regular expression to restrict when a test run is executed |
+
+**name** - You can use some project variables to create dynamic test run names
+
+| Variable | Example | Result |
+| ------------ | ----------------------- | --------------- |
+| {project_id} | 'Test run {project_id}' | Test run 123 |
+| {suite_id} | 'Test run {suite_id}' | Test run 456 |
+| {branch} | 'Test run {branch}' | Test run master |
+
+
+**Environment variables required**
+
+| Variable name | Description |
+| ------------------- | --------------------------- |
+| TESTRAIL_KEY | TestRail user password |
+| TESTRAIL_USER | TestRail user email address |
+
+
+
+## How to use
+
+To get test cases marked as success or fail on TestRail we have to add tags with TestRail test case ID
+on each scenario.
+
+Test case tag structure:
+
+`prefix` + `test case id`
+
+`@testrail-` + `C1104`
+
+See example below:
+
+```gherkin
+Feature: Log in and out
+
+ Background:
+ Given I am logged out from Hub
+ And I navigate to the home page
+
+ @testrail-C1104
+ @testrail-C45933
+ Scenario: Admin can login
+ When I enter the username admin
+ And I enter the password admin
+ And I click the Login button
+ Then I see the admin's landing page
+```
+
+Note: some scenarios can cover multiple TestRail cases, for that you just need to add multiple tags.
+
+## How to contribute
+
+### Install dependencies for development
+
+```
+pipenv install --dev
+```
+
+### How to run tests
+
+Activate your virtual environment and then just run tox.
+```
+tox
+```
+
+## How to distribute
+
+If you need to publish a new version of this package you can use this command:
+
+```
+python setup.py sdist bdist_wheel
+twine upload dist/*
+```
+
+
+# License
+Licensed under `MIT license`. View [license](LICENSE).
+
+
+
+
+%package -n python3-behave-testrail-reporter
+Summary: Behave library to integrate with Testrail API
+Provides: python-behave-testrail-reporter
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-behave-testrail-reporter
+# Behave to TestRail Reporter
+
+
+[![CircleCI](https://circleci.com/gh/Virtualstock/behave-testrail-reporter.svg?style=svg)](https://circleci.com/gh/Virtualstock/behave-testrail-reporter)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Virtualstock/behave-testrail-reporter&amp;utm_campaign=Badge_Grade)
+[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&utm_medium=referral&utm_content=Virtualstock/behave-testrail-reporter&utm_campaign=Badge_Coverage)
+[![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge)
+
+This integration is used to add test results to TestRail automatically when Behave tests are executed.
+
+
+Example of the generated report:
+
+```
+3 testrail test cases passed, 0 failed, 19 skipped, 2 untested
+Took 0m6.349s
+```
+
+## Install
+
+Can install it using pipenv
+
+```
+$ pipenv install behave-testrail-reporter
+```
+
+or using pip
+
+```
+$ pip install behave-testrail-reporter
+```
+
+## Setup
+
+Add `TestrailReporter` to behave reporters in your `/features/environment.py` by adding this code in `before_all()`
+
+```python
+from behave_testrail_reporter import TestrailReporter
+
+def before_all(context):
+ # ... all your other awesome code in here
+ current_branch = os.environ.get('CIRCLE_BRANCH') # Change this to get the current build branch of your CI system
+ testrail_reporter = TestrailReporter(current_branch)
+ context.config.reporters.append(testrail_reporter)
+```
+
+
+Create a `testrail.yml` config file in the root of your project
+
+
+Example structure:
+
+
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Advanced tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+ - name: 'Smoke tests on branch {branch}'
+ id: 1234
+ suite_id: 789
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+```
+
+Allow only **master** branch and **release1.111.1** to push test results to Testrail:
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Full E2E tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ allowed_branch_pattern: '^(master|release\/\d+([\.\d]+)?)$'
+```
+
+| yaml key | Description |
+| ---------------------- | ---------------------------------------------------------- |
+| name | Project name |
+| id | Testrail project id |
+| suite_id | Testrail Suite id |
+| allowed_branch_pattern | Regular expression to restrict when a test run is executed |
+
+**name** - You can use some project variables to create dynamic test run names
+
+| Variable | Example | Result |
+| ------------ | ----------------------- | --------------- |
+| {project_id} | 'Test run {project_id}' | Test run 123 |
+| {suite_id} | 'Test run {suite_id}' | Test run 456 |
+| {branch} | 'Test run {branch}' | Test run master |
+
+
+**Environment variables required**
+
+| Variable name | Description |
+| ------------------- | --------------------------- |
+| TESTRAIL_KEY | TestRail user password |
+| TESTRAIL_USER | TestRail user email address |
+
+
+
+## How to use
+
+To get test cases marked as success or fail on TestRail we have to add tags with TestRail test case ID
+on each scenario.
+
+Test case tag structure:
+
+`prefix` + `test case id`
+
+`@testrail-` + `C1104`
+
+See example below:
+
+```gherkin
+Feature: Log in and out
+
+ Background:
+ Given I am logged out from Hub
+ And I navigate to the home page
+
+ @testrail-C1104
+ @testrail-C45933
+ Scenario: Admin can login
+ When I enter the username admin
+ And I enter the password admin
+ And I click the Login button
+ Then I see the admin's landing page
+```
+
+Note: some scenarios can cover multiple TestRail cases, for that you just need to add multiple tags.
+
+## How to contribute
+
+### Install dependencies for development
+
+```
+pipenv install --dev
+```
+
+### How to run tests
+
+Activate your virtual environment and then just run tox.
+```
+tox
+```
+
+## How to distribute
+
+If you need to publish a new version of this package you can use this command:
+
+```
+python setup.py sdist bdist_wheel
+twine upload dist/*
+```
+
+
+# License
+Licensed under `MIT license`. View [license](LICENSE).
+
+
+
+
+%package help
+Summary: Development documents and examples for behave-testrail-reporter
+Provides: python3-behave-testrail-reporter-doc
+%description help
+# Behave to TestRail Reporter
+
+
+[![CircleCI](https://circleci.com/gh/Virtualstock/behave-testrail-reporter.svg?style=svg)](https://circleci.com/gh/Virtualstock/behave-testrail-reporter)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Virtualstock/behave-testrail-reporter&amp;utm_campaign=Badge_Grade)
+[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/7823c0c33c6a4e12917113bfdc8a135b)](https://www.codacy.com/app/Virtualstock/behave-testrail-reporter?utm_source=github.com&utm_medium=referral&utm_content=Virtualstock/behave-testrail-reporter&utm_campaign=Badge_Coverage)
+[![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge)
+
+This integration is used to add test results to TestRail automatically when Behave tests are executed.
+
+
+Example of the generated report:
+
+```
+3 testrail test cases passed, 0 failed, 19 skipped, 2 untested
+Took 0m6.349s
+```
+
+## Install
+
+Can install it using pipenv
+
+```
+$ pipenv install behave-testrail-reporter
+```
+
+or using pip
+
+```
+$ pip install behave-testrail-reporter
+```
+
+## Setup
+
+Add `TestrailReporter` to behave reporters in your `/features/environment.py` by adding this code in `before_all()`
+
+```python
+from behave_testrail_reporter import TestrailReporter
+
+def before_all(context):
+ # ... all your other awesome code in here
+ current_branch = os.environ.get('CIRCLE_BRANCH') # Change this to get the current build branch of your CI system
+ testrail_reporter = TestrailReporter(current_branch)
+ context.config.reporters.append(testrail_reporter)
+```
+
+
+Create a `testrail.yml` config file in the root of your project
+
+
+Example structure:
+
+
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Advanced tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+ - name: 'Smoke tests on branch {branch}'
+ id: 1234
+ suite_id: 789
+ # note: this will allow any branch to push test case results to Testrail.
+ allowed_branch_pattern: '.*'
+```
+
+Allow only **master** branch and **release1.111.1** to push test results to Testrail:
+```yaml
+base_url: https://your-domain.testrail.io
+projects:
+ - name: 'Full E2E tests on branch {branch}'
+ id: 123
+ suite_id: 456
+ allowed_branch_pattern: '^(master|release\/\d+([\.\d]+)?)$'
+```
+
+| yaml key | Description |
+| ---------------------- | ---------------------------------------------------------- |
+| name | Project name |
+| id | Testrail project id |
+| suite_id | Testrail Suite id |
+| allowed_branch_pattern | Regular expression to restrict when a test run is executed |
+
+**name** - You can use some project variables to create dynamic test run names
+
+| Variable | Example | Result |
+| ------------ | ----------------------- | --------------- |
+| {project_id} | 'Test run {project_id}' | Test run 123 |
+| {suite_id} | 'Test run {suite_id}' | Test run 456 |
+| {branch} | 'Test run {branch}' | Test run master |
+
+
+**Environment variables required**
+
+| Variable name | Description |
+| ------------------- | --------------------------- |
+| TESTRAIL_KEY | TestRail user password |
+| TESTRAIL_USER | TestRail user email address |
+
+
+
+## How to use
+
+To get test cases marked as success or fail on TestRail we have to add tags with TestRail test case ID
+on each scenario.
+
+Test case tag structure:
+
+`prefix` + `test case id`
+
+`@testrail-` + `C1104`
+
+See example below:
+
+```gherkin
+Feature: Log in and out
+
+ Background:
+ Given I am logged out from Hub
+ And I navigate to the home page
+
+ @testrail-C1104
+ @testrail-C45933
+ Scenario: Admin can login
+ When I enter the username admin
+ And I enter the password admin
+ And I click the Login button
+ Then I see the admin's landing page
+```
+
+Note: some scenarios can cover multiple TestRail cases, for that you just need to add multiple tags.
+
+## How to contribute
+
+### Install dependencies for development
+
+```
+pipenv install --dev
+```
+
+### How to run tests
+
+Activate your virtual environment and then just run tox.
+```
+tox
+```
+
+## How to distribute
+
+If you need to publish a new version of this package you can use this command:
+
+```
+python setup.py sdist bdist_wheel
+twine upload dist/*
+```
+
+
+# License
+Licensed under `MIT license`. View [license](LICENSE).
+
+
+
+
+%prep
+%autosetup -n behave-testrail-reporter-0.5.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-behave-testrail-reporter -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2640ab8
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ae274572afd20268b3d89f650682ad0a behave-testrail-reporter-0.5.1.tar.gz