Rally Test Set and Test Cases results update in karate scenarios run [duplicate] - karate

We are using Karate heavily for various projects and though the report generated using karate Reports are more than anyone would need. I am still interested in getting Allure integrated in the mix.
Added allure-junit4 dependency and added allure listener
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
<!-- -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"-->
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Now allure-results is getting created and I can see report but it's almost blank.
How can I get allure report generated on karate based project?

If Allure supports the Cucumber JSON output it should work. Else suggest you take this up with the Allure team.
You can refer to this thread (for Extent): https://github.com/intuit/karate/issues/619
EDIT: Since I refer anyone asking about extending / custom reports to this answer, read on.
In Karate 1.0 onwards, the Results object can be used to get all data about the test results. Also multiple JSON files will be output to the <build>/karate-reports. You can even re-try some tests and merge the results: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#retry-framework-experimental
Also please be aware of changes to the Java hooks, it is called RuntimeHook now: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#hooks

Related

How to integrate Karate Framework with qTest [duplicate]

We are using Karate heavily for various projects and though the report generated using karate Reports are more than anyone would need. I am still interested in getting Allure integrated in the mix.
Added allure-junit4 dependency and added allure listener
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
<!-- -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"-->
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Now allure-results is getting created and I can see report but it's almost blank.
How can I get allure report generated on karate based project?
If Allure supports the Cucumber JSON output it should work. Else suggest you take this up with the Allure team.
You can refer to this thread (for Extent): https://github.com/intuit/karate/issues/619
EDIT: Since I refer anyone asking about extending / custom reports to this answer, read on.
In Karate 1.0 onwards, the Results object can be used to get all data about the test results. Also multiple JSON files will be output to the <build>/karate-reports. You can even re-try some tests and merge the results: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#retry-framework-experimental
Also please be aware of changes to the Java hooks, it is called RuntimeHook now: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#hooks

How to determine if the target scenario has been called by another scenario in the Karate framework [duplicate]

We are using Karate heavily for various projects and though the report generated using karate Reports are more than anyone would need. I am still interested in getting Allure integrated in the mix.
Added allure-junit4 dependency and added allure listener
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
<!-- -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"-->
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Now allure-results is getting created and I can see report but it's almost blank.
How can I get allure report generated on karate based project?
If Allure supports the Cucumber JSON output it should work. Else suggest you take this up with the Allure team.
You can refer to this thread (for Extent): https://github.com/intuit/karate/issues/619
EDIT: Since I refer anyone asking about extending / custom reports to this answer, read on.
In Karate 1.0 onwards, the Results object can be used to get all data about the test results. Also multiple JSON files will be output to the <build>/karate-reports. You can even re-try some tests and merge the results: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#retry-framework-experimental
Also please be aware of changes to the Java hooks, it is called RuntimeHook now: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#hooks

Integrate Karate results into a database for test automation [duplicate]

We are using Karate heavily for various projects and though the report generated using karate Reports are more than anyone would need. I am still interested in getting Allure integrated in the mix.
Added allure-junit4 dependency and added allure listener
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
<!-- -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"-->
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Now allure-results is getting created and I can see report but it's almost blank.
How can I get allure report generated on karate based project?
If Allure supports the Cucumber JSON output it should work. Else suggest you take this up with the Allure team.
You can refer to this thread (for Extent): https://github.com/intuit/karate/issues/619
EDIT: Since I refer anyone asking about extending / custom reports to this answer, read on.
In Karate 1.0 onwards, the Results object can be used to get all data about the test results. Also multiple JSON files will be output to the <build>/karate-reports. You can even re-try some tests and merge the results: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#retry-framework-experimental
Also please be aware of changes to the Java hooks, it is called RuntimeHook now: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#hooks

Karate and Report portal IO Integration [duplicate]

We are using Karate heavily for various projects and though the report generated using karate Reports are more than anyone would need. I am still interested in getting Allure integrated in the mix.
Added allure-junit4 dependency and added allure listener
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
<!-- -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"-->
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Now allure-results is getting created and I can see report but it's almost blank.
How can I get allure report generated on karate based project?
If Allure supports the Cucumber JSON output it should work. Else suggest you take this up with the Allure team.
You can refer to this thread (for Extent): https://github.com/intuit/karate/issues/619
EDIT: Since I refer anyone asking about extending / custom reports to this answer, read on.
In Karate 1.0 onwards, the Results object can be used to get all data about the test results. Also multiple JSON files will be output to the <build>/karate-reports. You can even re-try some tests and merge the results: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#retry-framework-experimental
Also please be aware of changes to the Java hooks, it is called RuntimeHook now: https://github.com/intuit/karate/wiki/1.0-upgrade-guide#hooks

How to generate JUnit sources using maven-gunit-plugin

I have maven configured to run gunit (an ANTLR grammar unit testing tool) through the maven-gunit-plugin. gunit, however, has two different modes. The first mode causes gunit to act as an interpreter, reading through the *.gunit (or *.testsuite) file, interpreting it, and displaying the results. It can be configured as such:
<plugin>
<groupId>org.antlr</groupId>
<artifactId>maven-gunit-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<id>maven-gunit-plugin</id>
<phase>test</phase>
<goals>
<goal>gunit</goal>
</goals>
</execution>
</executions>
</plugin>
The second mode causes gunit to generate source code that can be run by JUnit. How can I instruct the maven-gunit-plugin to generate JUnit sources instead of acting as an interpreter?
A few notes:
I can change the test phase to "generate-test-sources" to cause the maven plugin to run at the correct time.
I couldn't find any useful documentation on the maven-gunit-plugin
I've seen people use exec-maven-plugin to run gunit with a specific command line option, but I'm not looking to do that.
EDIT / RESOLUTION:
After reading the various responses, I downloaded the ANTLR source code, which includes the maven-gunit-plugin. The plugin does not support junit generation. It turns out that the codehaus snapshot of the gunit-maven-plugin and the exec plugin are currently the only options.
I found a discussion through MNG-4039 that is illustrated with a maven-gunit-plugin gunit-maven-plugin sample. I'll let you read the whole article but, according to the author, you should end up with something like this:
<dependencies>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.1.1</version>
</dependency>
<!-- Here is the 'extra' dep -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
<version>3.1.1</version>
<!-- we try to use scope to hide it from transitivity -->
<scope>test</scope> <!-- or perhaps 'provided' (see later discussion) or 'import' (maven >= 2.0.9) -->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gunit-maven-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I didn't test this configuration myself and can't thus confirm everything is working out of the box. I don't even know if the plugin has been released in a non SNAPSHOT version. The only thing I can confirm is that it seems indeed very hard to find "real" documentation about the maven-gunit-plugin.
There is sad news here
I found out so far there is no
GUnit-functionality (be it JUnit
Test-Generation or direct invocation
of GUnit) for maven right now. I
already mailed with Jim Idle concering
the state of GUnit in the
antlr3-maven-plugin and learned that
there is a patch to the old version of
the maven-plugin waiting in the queue.
I think this workaround that is the only option.