My framework makes use of spark extent report. Below is my extent.properties
Now, I am trying to integrate Retry mechanism in my framework. The issue is, the report marks retried cases as failed in the report and in pdf.
PS: My framework is cucumber with Testng and built in Gradle. And I run it via testng.xml
Please help.
In below screenshot there are 10 skipped entries but neither the report nor the pdf shows that. It shows
passed = Pass
failed + skipped = Fail
How can I fix this?
Related
I have installed sonar Qube and integrated it with node js application.
Right now I am getting code coverage as zero so I created a sonar properties file as below
sonar.projectKey=MyApp
sonar.login=[token]
sonar.sources=.
#sonar.exclusions=app/node_modules/*,app/coverage/lcov-report/*
# coverage reporting
sonar.javascript.coveragePlugin=lcov
sonar.javascript.lcov.reportPaths=app/coverage/lcov.info
but still my code coverage is coming as 0 %
Any Idea how can I solve this.
There are some information gaps that we should fill in so that I can help you better, like, when you're trying to get coverage? You're using some kind of CI/CD pipeline?
Despite this, I had a similar problem a while back and I believe it might help, it turns out that when you use sonarcloud in some pipeline the code that is scanned by the sonar is the difference between the source code and yours.
So if you add or change code which is not covered by test setup it will show code coverage as no information and if you add or change code covered it will show a percentage just referring to changed code.
I will also share with you my sonar setup from a personal project, hope it helps.
sonar.projectKey=some_organization_algorithms-data-structures
sonar.organization=some_organization
sonar.projectName=Algorithms and Data Structures
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.exclusions=**/*.spec.ts
sonar.tests=__tests__
sonar.test.inclusions=**/*.spec.ts
sonar.javascript.lcov.reportPaths=coverage/lcov.info
Im trying to using Cucable plugin for my cucumber automation framework, In order to be able to run scenarios and scenario outline in parallel and tests are getting skipped.
I tried to implement this using https://github.com/trivago/cucable-plugin#cucablerunner.
I followed each step but still I dont have success
I have inherited a Java / Maven / Cucumber project. I am fairly new to Cucumber.
Inside one of the folder I have a class like this...
import com.intuit.karate.junit4.Karate;
import org.junit.runner.RunWith;
#RunWith(Karate.class)
public class RoadsRunner {
}
Then in the same subdirectory / package I have a .feature file.
with a number of scenario's.
Feature: Check transaction
Background:
* url apiHost + '/api/v1'
* configure headers = {'X-TransactionID': '#(Math.random().toString())' }
Scenario: Get Classes
# get classes
Given path '/myUrl/classes'
And param processName = 'myProcess'
When method get
Then status 200
Question One.
I am using Eclipse. Is there a way I can debug through the test in a similar way that I would debug a Java app?
I have downloaded myself the Cucumber Eclipse plugin but can't quite figure out how to use it.
Question Two.
Without using a custom plugin to debug is there anything I can add to the scenarios to maybe print extra debug information.
thanks
The Cucumber Eclipse plugin gives you 2 things:
IDE syntax coloring / formatting support
Being able to right-click and run a Feature directly without the JUnit "runner"
Karate is Java behind the scenes so you can debug and set break-points, but it may not be as seamless as you expect. In 0.6.0 you have the option of placing a conditional break-point in Karate code that runs before / after each test step - see screen-shot.
So as you rightly called out, printing to the log might be the most effective way to work through complicated test scripts. Please refer to the print keyword - which is exactly what you are looking for.
2 more points:
the optional HTML report includes all HTTP request / response logs - which is great for troubleshooting a test.
I would love for the Karate UI (currently in alpha) to become stable sooner and be the best option for debugging, please do submit feedback and contribute if you can.
EDIT: we now have the Visual Studio Code IDE support with first-class debug support: https://github.com/intuit/karate/wiki/IDE-Support#vs-code-karate-plugin
EDIt2: If you want to debug Java code, that is possible with the new IntelliJ plugin: https://plugins.jetbrains.com/plugin/19232-karate
As per the documentation here, At this moment best way to debug Karate Steps is using Visual Studio Code for developing tests and VS Code Karate Plugin for debugging.
Visual Studio Code is Free, built on open Source and runs on all platforms including mac/linux and windows.
Please note this
The Karate UI has been retired and is not available in 0.9.5 onwards !
Use the VS Code Debug Support instead.
As per the comment by Peter Thomas, Eclipse/IntelliJ may also support debugging but I am unable to find any development there.
I am running the nightwatch tests and want to separate out failures based on whether they are
actual bugs
flaky tests
failures
success
I want to document this in junit reporting system that nightwatch has as I use the junit report to create a report in Jenkins. Does anyone know of a system that will allow me to do that? Or how I can go about changing the framework to do that?
You could annotate those test with different tag names.
module.exports = {
'#tags' : ['bugs'],
So you can treat them seperatetly in jenkins running different jobs for them, for instance.
I have a node.js project running mocha tests, and I'm generating a coverage report using blanket. I've managed to get the coverage report generated, but I'm not sure how to generate a report that can be consumed by and viewed in Jenkins. Any suggestions? I'm looking for a result similar to the Cobertura plugin (https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin).
Edit: Sorry i misread your question, if the coverage report gets published with the xunit report i dont know. So the following might not help you.
The XUnit reporter should create a report that can be parsed by jenkins.
Check out this blog post.
Also, have a look into the XUnit Plugin, it allows to specify the parser for various kinds of report formats.
Quote for persistence:
Source https://blog.dylants.com/2013/06/21/jenkins-and-node/