Closed phiripatrick663 closed 5 years ago
@phiripatrick663, could you upload to github an example project where this error is reproduced?
Yes, creating new repo. Thanks.
I was able to upload my project, may contain other branches that I could not remove. https://github.com/phiripatrick663/EPMTest.git You can look for a branch feature:/AllureReporting, which has the configuartion that produces error. Hope that helps. Thanks in advance for looking into this.
@phiripatrick663 In the specified branch, none of the projects uses any of my packages. Therefore, I cannot reproduce this error at the moment. Maybe you forgot to push the latest changes to the branch?
Let me check and re-upload. Thanks.
Sorry for that, I had not made new commit. Packages are showing now and just checked, still getting the error. I have packages added to the SpecFlow project and you can test the "User can login" simple test to see error.
@phiripatrick663
Steps to resolve this error:
1) Delete package Allure.Commons.
2). Add specflow.json
file to the project with next content:
{
"stepAssemblies": [
{
"assembly": "Allure.SpecFlowPlugin"
}
]
}
Set Copy to Output Directory
value "Copy if newer" to specflow.json file.
PS: This is my simplification that I did not create a page with a description of what needs to be done after installing the package if this file was not automatically added.
Thanks. I will make changes and give update after testing.
Success! Test ran with no error and for the first time I can see report! Thank you very much! Another question now is how can I attach screen shots to report with my current configuration?
@phiripatrick663 You need to remove all the code that is responsible for taking the screenshot and paste something like this:
1) If overall status is not passed - take a screenshot at the end of the test:
2) If an error occurs at some step or the verification fails, you can set any actions. As an example - taking a screenshot.
Thank you. Will make suggested changes. Appreciate the help.
@phiripatrick663 found a couple of errors due to which the behavior mentioned above may not work. Update the package as soon as it appears.
Update. The screenshot attachment is working great. Thanks for the suggestion!!
If you don't mind, you could update your readme to help more C# users who will find your plugin very useful. I struggled for a few days before asking, and thank you for taking time to look at my specific situation. Much appreciated.
I downloaded update, even though I didn't see error you mentioned. One thing I have noticed is that the History is not recording number of runs. Is that an allureConfig.json issue?
I also experienced a warning with Jenkins which I am trouble shooting.
Although all tests passed, result was a failure. I now can also see Allure report in Jenkins, was not happening before.
seems like my last post is from a build error from MSBuild, tyrying a solution.
Update: The previous Jenkins warning is my local installation, but when I go to remote Jenkins sever I get an compilation error on solution 1 above: error CS1738: caused by line: AllureLifecycle.Instance.AddAttachment(name: "Screenshot", type: AllureLifecycle.AttachFormat.ImagePng, arr); Looking at possible solutions.
@phiripatrick663
About EXEC warning
, just turn off discovering steps: https://github.com/Noksa/Allure.NUnit/wiki/AllureStep-Attribute
I downloaded update, even though I didn't see error you mentioned. One thing I have noticed is that the History is not recording number of runs. Is that an allureConfig.json issue?
If you are talking about local runs, then the history is not stored there. The CI/CD server is responsible for storing history.
Update: The previous Jenkins warning is my local installation, but when I go to remote Jenkins sever I get an compilation error on solution 1 above: error CS1738: caused by line: AllureLifecycle.Instance.AddAttachment(name: "Screenshot", type: AllureLifecycle.AttachFormat.ImagePng, arr); Looking at possible solutions.
I’m unlikely to help with this. Here the problem is in the build stage on the server. Perhaps some version of the framework is missing. Provide more information about the error, maybe then it will be clear.
Thanks for the insight. I turned off step discovery, that error is gone. You are correct of the server missing some framework components, I am working through our support team to get environment updated. Thanks for all your input, this was just my update. You can close this issue. It's resovled.
I have installed the NUnit package through Nuget and have: Allure.NUnit NUnit.SpecFlow3 Allure.SteInjector in the project. My allureConfig.jon is as shown in the example, but running test is giving an error:
I'm not sure how else to configure. Please advise on correct steps. My environment is .NetFramework 4.6.2, NUnit 3.0, SpecFlow 3.0.2 Thanks.