Reputation: 37
I am using Ride (RobotFramework IDE) and I have imported Library AllureReportLibrary
in my project.
Using the Set Output Dir
, I am creating a Directory C:/AutomationLogs/Allure
and all the allure properties and xml files are getting generated in that path.
Set Output Dir C:/AutomationLogs/
Then I am using the "allure serve C:\AutomationLogs\Allure" command to try and generate the html report file in command prompt, but it shows the below error -
"Could not read result C:\AutomationLogs\Allure\f56f4796-d30a-47f3-a988-d17f6c4e13ca-testsuite.xml: {} com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize va lue of type
ru.yandex.qatools.allure.model.SeverityLevel
from String "None": value not one of declared Enum instance names: [trivial, blocker, minor, normal, critical]"
The xml file "f56f4796-d30a-47f3-a988-d17f6c4e13ca-testsuite.xml
" was generated using the AllureReportLibrary
Also the index.html file which is generated after the command opens after this command and shows Allure Report unknown unknown - unknown (Unknown) 0 test cases NaN%
I am using the below - Allure version - 2.4.1
Ride version - RIDE 1.5.2.1 running on Python 2.7.12.
I am new to Robot Framework and Allure. Please let me know whether I have implemented it correctly and why I am facing the above error.
-Ryan M
Upvotes: 2
Views: 3079
Reputation: 11
How to create the Allure reports in Robot Framework ?
Initially, Download the Command line and UNzip the file and save the path of the bin folder in environment.
Unzip the above file then put it in the Environment folder.
Then Pip install the below modules
In robot file, Add the Library in Settings like, Example :
Library AllureReportLibrary D:\eclipse\RobotFramework\results
Then Use the Below commands to run the robot code.
robot --listener allure_robotframework;D:\eclipse\RobotFramework\results Example.txt
Finally,
Generate the HTML file by,
allure generate D:\eclipse\RobotFramework\results
Note : Use the same path what you used in the previous command to generate the HTml.file. and Open in Mozhila FireFox. It wont be work in Chrome. I dont know exactly why.
Regards,
Vijay
Upvotes: 1
Reputation: 714
If your output.xml has severity = None
for any testcase then the allure-robotframework-adaptor will give the error that you have mentioned. Creating TestCase()
object with severity=''
in start_suitesetup
method of AllureListener.py
will do the trick.
def start_suitesetup(self, name, attributes):
....
....
test = TestCase(name=name,
description=description,
start=now(),
attachments=[],
labels=[],
parameters=[],
steps=[],
severity='')
Upvotes: 0
Reputation: 13256
I'm using the 1.1.1
version of Allure Adaptor for Robot Framework and the severity is picked from the test case tags and added as a label under the test-case
element of the report.
However, it seems that Allure 2.6.0
is also expecting a valid value for the severity
attribute of the test-case
element.
In order to use Allure2 with the current reports I have altered AllureListener.py
to also add the severity to the test case:
elif tag in SEVERITIES:
test.severity = tag
test.labels.append(TestLabel(
name='severity',
value=tag
))
Upvotes: 1