SpecRun execution results integration with TeamCity - teamcity

Is there any possibility in SpecRun to include test execution results to TeamCity build information like it can be done for SpecFlow(see desired info on screenshot).
http://i.stack.imgur.com/VPjC4.jpg
For SpecFlow it's easy to get build information because of NUnit XML report is getting generated and TeamCity can parse it easily. But for SpecRun we don't have such a report.
I want to get such results as u can see on screenshot:

If I understand you correctly - you're asking if the test summary shows up on the build results summary, and populates the Tests tab. This may be what you're looking for:
SpecRun.exe BuildServerRun Default.srprofile /buildserver:teamcity
Source: https://specflow.org/plus/documentation/SpecFlowPlus-and-TeamCity/

It's pretty simple!
get specrun.log text
split it by 'Total:'
get last part - it would be result of tests
pass it to TeamCity through <TeamCitySetStatus Status="SUCCESS" Text="Total:$(YourResult)" />
it will look like this.

Related

SonarQube report showing a different coverage than Gitlab RSpec (Ruby) report

Just as the title implies we're dealing with an "issue" regarding the information shown in SonarQube for our Ruby Code Coverage when we compare it to the Gitlab Pipeline job execution given that in the Pipe execution it's showing
as you can see it shows 91.21% coverage/covered
While in SonarQube we're getting the following result:
Which is weird given that they are both supposedly taking reading the same report
We're using SimpleCov 0.21.1 and only made some minor adjustment to the report in order to avoid using the "branches" feature that came after simplecov 0.18+.
Maybe those are 2 different values and not related at all and I'm getting it all wrong? Any help or guidance would be greatly appreciated :')
Thanks a lot in advance and happy holidays for everyone !

How to get code coverage report when I run tests using java language which tests Go Project code?

I have a very special requirement in integration testing in go. In the past few days I have read through many blogs but I am unable to get the solution for this problem. Please share me if you have done anything below.
Infra details:
Having Go project up and running
Having my automation framework written in JAVA
My Exact requirement is:
I have to instrument the Go code and make the go code running
Execute my java automation code
Stop the Go code / get the code coverage report from Go
Thanks in advance!!
write your Go code as a test, in a file ending_test in the package directory
run the Go test as $ go test --coverprofile outfile . If it needs to run as a server then add some code to time it out
run your additional Java code
wait for the timeout
use a command like $ go tool cover -html=outfile -o cover.html to see the coverage analysis
The goc tool should meet your needs, it basically just need three steps:
launch a services registry center via goc server command
use goc build . to build your Go code and execute the generated binary which would register itself into the registry center above
Execute your automation codes, then you can use goc profile to get the code coverage profile at anytime

NUnit test results and reportunit

I am currently using NUnit in Visual Studio to execute my Selenium tests. What I want is some good reporting and I found ReportUnit.
What I cannot seem to figure out is where NUnit places the test result xml files on my machine. I am no tech-wiz so I am struggling to find out how to get ReportUnit working. I found the documentation here: http://relevantcodes.com/reportunit/
But cannot quite figure out how to get my test result files in a specific folder and then open them with ReportUnit.
Any help is appreciated.
Kind regards,
Anand
Use the --out option of nunit3-console.exe to specify where the result file should go. e.g.
nunit3-console.exe MyTests.dll --out=C:/TestResult.xml

How to generate Test Case Report from Xcode

I'm using default XCTest test framework to write and test application & I could able to do that. But to generate Test-Case report I'm not seeing any option except Xcode Server. Is there any other way to generate Test Case Report!! Any Suggestion !
when u run your test, a report is generated in
/Users/username/Library/Developer/Xcode/DerivedData/projectname/Logs/Test/TestSummary.plist
there you will get your all test information. But if you want a html format report you have to use
xcpretty.
let me know if you want to use xcpretty for html report or u can do your job using the TestSummary.plist
If you run your tests using fastlane/scan, an HTML report will be generated at the end of each test run as standard. It will open automatically in your browser when the tests are finished unless you tell it not to.
Scan is an easy way to simplify your test runs and make them configurable. The report is generated by xcpretty.

Identify jenkins error messages for failed tests and debugging

Is it possible to find out why the tests on the jenkins server failed? Meaning like an error message? I am new to testing and although I did some front end testing with Chutzpah, this is a totally new concept. Could someone please throw a light on this?Also, is there anyway to debug my tests in jenkins?
I am running my tests on visual studio and all the tests are passing but when I run them on jenkins, I see that some of them are failing and some of them are passing
There should be a "Console log" link on each test; click on that.
As Oli Charlesworth sad use the "console log" (+1) there you get (nearly) same errors like in VS. Mostly I scroll down to the end of the log and search for the error bottom up, because the error is usually one of the last actions.
I do not know anyway how you can debug tests in Jenkins.

Resources