-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pagopa/test-automation
automation test first commit
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Run Behave Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 9 * * *' # Esegue ogni giorno alle 9:00 UTC | ||
workflow_dispatch: # Permette di eseguire manualmente il workflow | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10.5 | ||
- uses: cryptic-wizard/[email protected] | ||
with: | ||
test-path: automation-test | ||
test-output-name: results.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: showing off behave | ||
|
||
Scenario: run a simple test | ||
Given we have behave installed | ||
When we implement a test | ||
Then behave will test it for us! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from behave import * | ||
|
||
|
||
@given('we have behave installed') | ||
def step_impl(context): | ||
pass | ||
|
||
|
||
@when('we implement a test') | ||
def step_impl(context): | ||
assert True is not False | ||
|
||
|
||
@then('behave will test it for us!') | ||
def step_impl(context): | ||
assert context.failed is False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[ | ||
{ | ||
"elements": [ | ||
{ | ||
"keyword": "Scenario", | ||
"location": "features/helloworld.feature:3", | ||
"name": "run a simple test", | ||
"status": "passed", | ||
"steps": [ | ||
{ | ||
"keyword": "Given", | ||
"location": "features/helloworld.feature:4", | ||
"match": { | ||
"arguments": [], | ||
"location": "features/steps/helloworld.py:4" | ||
}, | ||
"name": "we have behave installed", | ||
"result": { | ||
"duration": 0.00016880035400390625, | ||
"status": "passed" | ||
}, | ||
"step_type": "given" | ||
}, | ||
{ | ||
"keyword": "When", | ||
"location": "features/helloworld.feature:5", | ||
"match": { | ||
"arguments": [], | ||
"location": "features/steps/helloworld.py:9" | ||
}, | ||
"name": "we implement a test", | ||
"result": { | ||
"duration": 9.775161743164062e-05, | ||
"status": "passed" | ||
}, | ||
"step_type": "when" | ||
}, | ||
{ | ||
"keyword": "Then", | ||
"location": "features/helloworld.feature:6", | ||
"match": { | ||
"arguments": [], | ||
"location": "features/steps/helloworld.py:14" | ||
}, | ||
"name": "behave will test it for us!", | ||
"result": { | ||
"duration": 8.726119995117188e-05, | ||
"status": "passed" | ||
}, | ||
"step_type": "then" | ||
} | ||
], | ||
"tags": [], | ||
"type": "scenario" | ||
} | ||
], | ||
"keyword": "Feature", | ||
"location": "features/helloworld.feature:1", | ||
"name": "showing off behave", | ||
"status": "passed", | ||
"tags": [] | ||
} | ||
] |