diff --git a/.github/workflows/api_workflow.yml b/.github/workflows/api_workflow.yml index b7ac72d7..32b391f5 100644 --- a/.github/workflows/api_workflow.yml +++ b/.github/workflows/api_workflow.yml @@ -115,7 +115,7 @@ jobs: fi source $HOME/.bp-venv/bin/activate - sh api_run.sh "$TAGS" + sh api_run.sh "$TAGS" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" - name: Get Allure history uses: actions/checkout@v4 diff --git a/api_run.sh b/api_run.sh index eba35f0c..bb8d7ef1 100755 --- a/api_run.sh +++ b/api_run.sh @@ -1,4 +1,6 @@ #!/bin/sh # Run API tests -python -m pytest -v -s --gherkin-terminal-reporter --html="./output/reports/" --tags=$1 --self-contained-html --reruns 1 --reruns-delay 2 --alluredir=allure-results \ No newline at end of file +python -m pytest -v -s --gherkin-terminal-reporter --html="./output/reports/" --tags=$1 --self-contained-html --reruns 1 --reruns-delay 2 --alluredir=allure-results \ +--slack-webhook-url=$2 --slack-channel=pytest-test-automation --slack-results-url=https://tweag.github.io/pytest-automation-boilerplate --teams-webhook-url=$3 \ +--teams-results-url=https://tweag.github.io/pytest-automation-boilerplate/ \ No newline at end of file diff --git a/pytest.ini b/pytest.ini index 07c11cd0..7104920f 100755 --- a/pytest.ini +++ b/pytest.ini @@ -17,10 +17,3 @@ addopts = # Allure Report arguments --clean-alluredir --alluredir=output/allure/results -# Slack Notification arguments (fake hook for testing purpose only - --slack-webhook-url=https://hooks.slack.com/services/.. - --slack-channel=pytest-test-automation - --slack-results-url=http://localhost:63342/pytest-automation-boilerplate/output/allure/reports/index.html -# MS Teams Notification arguments(fake hook for testing purpose only - --teams-webhook-url=https://moduscreate.webhook.office.com/webhookb2/... - --teams-results-url=http://localhost:63342/pytest-automation-boilerplate/output/allure/reports/index.html