Skip to content

Commit

Permalink
Generate integration test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
timofurrer committed Sep 2, 2019
1 parent ac6af27 commit 78522e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
check-manifest
- name: Unit Test with pytest
run: |
coverage run --parallel -m pytest
coverage run -p -m pytest
- name: Integration Test with radish
run: |
radish -b tests/integration/radish tests/integration/features --no-ansi
coverage run -p -m radish -b tests/integration/radish tests/integration/features --no-ansi
- name: Report code coverage
run: |
coverage combine
Expand Down
12 changes: 11 additions & 1 deletion tests/integration/radish/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,17 @@ def create_base_dir_module(step, module_filename):
def run_feature_file(step, feature_filename):
"""Run the given Feature File"""
feature_path = os.path.join(step.context.features_dir, feature_filename)
radish_command = ["radish", "-b", step.context.base_dir, feature_path, "-t"]
radish_command = [
"coverage",
"run",
"-p",
"-m",
"radish",
"-b",
step.context.base_dir,
feature_path,
"-t",
]
proc = subprocess.Popen(
radish_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ envlist = lint,manifest,py35,py36,py37,integration,docs,coverage-report
setenv =
VIRTUALENV_NO_DOWNLOAD=1
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run --parallel -m pytest {posargs}
commands = coverage run -p -m pytest {posargs}


[testenv:integration]
Expand All @@ -19,7 +19,7 @@ setenv =
VIRTUALENV_NO_DOWNLOAD=1
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands =
radish -b tests/integration/radish tests/integration/features {posargs}
coverage run -p -m radish -b tests/integration/radish tests/integration/features {posargs}


[testenv:coverage-report]
Expand Down

0 comments on commit 78522e2

Please sign in to comment.