Feature/issue 234 add scenario attach method#329
Feature/issue 234 add scenario attach method#329kenhosr wants to merge 4 commits intopytest-dev:masterfrom
Conversation
* ISSUE-234 add scenario attach method
* ISSUE-234 add scenario attach method * add embeddings to logreport * add missing data * add media type * add to the end of the test * add embeddings
* fix unit tests/linting issues
* fixed lint issues of feature.py
Codecov Report
@@ Coverage Diff @@
## master #329 +/- ##
==========================================
- Coverage 95.64% 95.51% -0.13%
==========================================
Files 57 57
Lines 2202 2208 +6
Branches 184 184
==========================================
+ Hits 2106 2109 +3
- Misses 65 68 +3
Partials 31 31
Continue to review full report at Codecov.
|
|
found out an issue that when use Scenario Outline, it will attach data multiple times depending on the Examples table size. I will fix it later. |
|
Hi! This branch will go to merged with master? Any prevision? |
|
@kenhosr is it possible to revisit this one and freshen it up for merging? It seems like a very useful feature. Also, the gist linked here seems incorrect/unrelated:
could you freshen that up as well? Thank you! And finally, an additional thought: pytest-nunit also has the |
Description:
Fix Embedding made screenshot into cucumber json report #234, add scenario.attach method
Added scenario.attach method, so that you can add comments and/or screenshots to the cucumber-report.json file, and then you can convert the .json file to HTML report file
Referred to this https://github.com/gkushang/cucumber-html-reporter/blob/4ed7e774f93c54ecd71a051d414a6d30305694ec/lib/reporter.js , which will convert step.embeddings to
Show Info+An example usage:
update your conftest.py by implementing the hook: pytest_bdd_after_scenario
https://gist.github.com/kenhosr/3cb60efce5481d25967479e67f7edb76
run your test using: pytest --cucumber-json=cucumber_report.json
convert the .json to .html by following instructions here:
https://github.com/gkushang/cucumber-html-reporter
Sample Report: