-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,367 additions
and
478 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,12 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*.{php,md}] | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
insert_final_newline = true |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ Apache License | |
============== | ||
|
||
Copyright 2016 Eduard Sukharev <[email protected]> | ||
Copyright 2018 Tiko Lakin <[email protected]> | ||
|
||
_Version 2.0, January 2004_ | ||
_<<http://www.apache.org/licenses/>>_ | ||
|
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
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 |
---|---|---|
@@ -1,23 +1,34 @@ | ||
{ | ||
"name": "allure-framework/allure-behat", | ||
"description": "Behat output formatter for use with Yandex Allure reporting tool", | ||
"keywords": ["BDD", "Behat", "Allure"], | ||
"license": "Apache 2.0", | ||
"authors": [ | ||
{ | ||
"name": "Eduard Sukharev", | ||
"email": "[email protected]" | ||
} | ||
], | ||
|
||
"require": { | ||
"php": ">=5.5", | ||
"behat/behat": "~2.4", | ||
"allure-framework/allure-php-api": "~1.1.4" | ||
"name": "allure-framework/allure-behat", | ||
"description": "Behat output formatter for use with Yandex Allure reporting tool", | ||
"keywords": [ | ||
"BDD", | ||
"Behat", | ||
"Allure" | ||
], | ||
"license": "Apache 2.0", | ||
"authors": [ | ||
{ | ||
"name": "Eduard Sukharev", | ||
"email": "[email protected]" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"": "src/" | ||
} | ||
{ | ||
"name": "Tiko Lakin", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.5", | ||
"behat/behat": "^3.3", | ||
"allure-framework/allure-php-api": "~1.1.4" | ||
}, | ||
"require-dev": { | ||
"symfony/process": "~2.5|~3.0|~4.0", | ||
"phpunit/phpunit": "^4.8.36|^6.3" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"": "src/" | ||
} | ||
} | ||
} |
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,98 @@ | ||
Feature: Allure Formatter | ||
In order integrate with Allure test report tool | ||
As a developer | ||
I need to be able to generate a allure-compatible report | ||
|
||
Scenario: Scenario annotation | ||
Given a file named "behat.yml" with: | ||
""" | ||
default: | ||
formatters: | ||
pretty: false | ||
allure: true | ||
extensions: | ||
Allure\Behat\AllureFormatterExtension: | ||
severity_key: "severity:" | ||
ignored_tags: "tag_ignore" | ||
issue_tag_prefix: "JIRA:" | ||
test_id_tag_prefix: "BUG:" | ||
""" | ||
Given a file named "features/bootstrap/FeatureContext.php" with: | ||
""" | ||
<?php | ||
use Behat\Behat\Context\Context, | ||
Behat\Behat\Tester\Exception\PendingException; | ||
class FeatureContext implements Context | ||
{ | ||
/** | ||
* @Given /^scenario has annotation$/ | ||
*/ | ||
public function scenarioHasAnnotation() { | ||
return; | ||
} | ||
/** | ||
* @When /^it passed$/ | ||
*/ | ||
public function iAdd() { | ||
return; | ||
} | ||
/** | ||
* @Then /^annotation is collected$/ | ||
*/ | ||
public function somethingNotDoneYet() { | ||
return; | ||
} | ||
} | ||
""" | ||
And a file named "features/World.feature" with: | ||
""" | ||
@tag_feature @severity:blocker @JIRA:PROD-4444 | ||
Feature: Annotation | ||
In order to have meta information of the scenario | ||
As a features developer | ||
I want, allure to collect all feature & scenarios tags | ||
@tag_scenario @BUG:7654 @tag_ignore | ||
Scenario: Scenario annotation | ||
Given scenario has annotation | ||
When it passed | ||
Then annotation is collected | ||
""" | ||
When I run "behat --no-colors -f allure -o allure-results" | ||
Then "allure-results/*testsuite.xml" file xml should be like: | ||
""" | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<alr:test-suite xmlns:alr="urn:model.allure.qatools.yandex.ru" start="-IGNORE-VALUE-" stop="-IGNORE-VALUE-" version="1.4.0"> | ||
<name>default</name> | ||
<test-cases> | ||
<test-case start="-IGNORE-VALUE-" stop="-IGNORE-VALUE-" status="passed"> | ||
<name>features/World.feature:8</name> | ||
<title>Scenario annotation</title> | ||
<description type="text"><![CDATA[In order to have meta information of the scenario | ||
As a features developer | ||
I want, allure to collect all feature & scenarios tags]]></description> | ||
<steps> | ||
<step start="-IGNORE-VALUE-" stop="-IGNORE-VALUE-" status="passed"> | ||
<name>scenario has annotation</name> | ||
<title>Given scenario has annotation</title> | ||
</step> | ||
<step start="-IGNORE-VALUE-" stop="-IGNORE-VALUE-" status="passed"> | ||
<name>it passed</name> | ||
<title>When it passed</title> | ||
</step> | ||
<step start="-IGNORE-VALUE-" stop="-IGNORE-VALUE-" status="passed"> | ||
<name>annotation is collected</name> | ||
<title>Then annotation is collected</title> | ||
</step> | ||
</steps> | ||
<labels> | ||
<label name="severity" value="blocker"/> | ||
<label name="story" value="tag_feature"/> | ||
<label name="story" value="tag_scenario"/> | ||
<label name="issue" value="PROD-4444"/> | ||
<label name="testId" value="7654"/> | ||
</labels> | ||
</test-case> | ||
</test-cases> | ||
</alr:test-suite> | ||
""" |
Oops, something went wrong.