Comments (8)
Test run:
~/101discounts/tests/tmp_for_github$ py.test test_registration_a.py --alluredir /home/ngora/reports/ui/
Text during run:
================================================= test session starts ==================================================
platform linux2 -- Python 2.7.12, pytest-2.9.0, py-1.4.31, pluggy-0.3.1
rootdir: /home/ngora, inifile:
plugins: allure-adaptor-1.7.5
collected 1 items
test_registration_a.py .
Generate report:
~/reports/ui/allure_cli/bin$ ./allure report generate /home/ngora/reports/ui/
Open report:
~/reports/ui/allure_cli/bin$ ./allure report open
from allure-pytest.
@nataly22 could you please provide MVE and/or actual report (with source files and built reports)?
from allure-pytest.
from allure-pytest.
@nataly22 however useful screenshots could be they fail to provide the most crucial information.
Please attach a .tar.gz / .zip archive with the source code and reports to the github issue.
from allure-pytest.
sending archive
tmp_for_github.tar.gz
reports.tar.gz
from allure-pytest.
Apparently, you are doing screenshots wrong.
Contents of the attachment files are as follows:
pupssman@airship:~/Downloads $ cat ~/Downloads/3d95375c-d765-404a-9bf4-6c985832f0f2-attachment.png
Screen_start_pagepupssman@airship:~/Downloads $
I.e. there is plain text string Screen_start_page
instead of image data.
This may be caused by you explicitly commanding allure to attach that very plain text string in your code:
allure.attach('my attach','Screen_start_page', allure.attach_type.PNG)
As per allure's documentation, second argument to the allure.attach
method call is the file content to be attached, which one would expect to be the PNG raw data in your case, instead of the plain text string found in the code.
This appears to be a simple typo in the test code and is therefore not a problem with the allure or allure plugin at all.
Please, be more careful with your code and good luck)
from allure-pytest.
Thanks for the advice. The problem was solved as follows:
#We take screenshots by comand of uiautomator
d.screenshot('/home/ngora//reports/ui/myattach.png')
#open file as in python
f = open('/home/ngora//reports/ui/myattach.png')
#read files content to second parameter of attach method
allure.attach('Start2_page',f.read(), type=AttachmentType.PNG)
from allure-pytest.
Glad to know problem is solved
from allure-pytest.
Related Issues (20)
- How to make allure plugin dependent on another plugin? HOT 2
- Can I see log trace of a passed test case, currently the debug trace is only for failed test cases HOT 2
- @Attachment for video having .webm is not attaching to the allure report in Ubuntu HOT 3
- seeing some os.error too many files.. any known issue here ? HOT 1
- Plugin already registered HOT 5
- I am looking to add a attachment in one of the tabs , not to a test case HOT 3
- Got ImportError: cannot import name 'unicodify' error after updating to version allure-pytest 2.0.0b2 HOT 31
- Unable to execute test cases specifying --allure_features or --allure stories attribute HOT 5
- Support tags: HOST, FEATURE and etc via LabelType class HOT 1
- Teardown function's logs not captured in allure report HOT 3
- Providing a responsive UI HOT 1
- Incompatible with pytest 3.2.0 HOT 1
- getting ValueError: option names set(['--alluredir']) already added" while trying to build a job on jenkins with allure-pytest plugin HOT 1
- Cyrillic symbols display like unicode in test's title HOT 1
- Multiple flow test xml-report counldn't be generated if one or more tests failed HOT 2
- Is it possible to rename test suits and test cases names? HOT 8
- why?How to solve this error? HOT 1
- Warnings during generating of allure report - RemovedInPytest4Warning HOT 3
- good!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allure-pytest.