I am trying to integrate existing testng automation framework with QAF BDD. Existing framework looking for Group, Product, Tags annotation to push result to customized dashboard to maintain historical test results.
From QAF dashboard, I could able to see Group, Product values that I passed in feature file. Similarly I have to pass the same value to my existing dashboard from my custom report java class.
Sample feature file:
Feature: Testing QAF integration with Testng Framework
@Pre-requisities
@dataFile:resources/testdata/login.csv
@description:Testing
@Product:Lantern Reporting Service
@TestID:12345
@author:Anbarasu Murugesan
@Group:TestingGroup
Scenario: Login using valid credential
Given load account data by name "${account}"
Given launch application using "${clientType}" "${deviceId}"
Given generate three legged oauth
QAF Dashboard:
I tried to create Group.class to get value of annotation @Group:TestingGroup but it is not working as I expected. how to create Group.class to get value that I am passing in feature file
package reporter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Inherited
@Retention (RetentionPolicy.RUNTIME)
@Target ({ ElementType.TYPE })
public @interface Group {
String group() default "";
}
Custom report java class -> passing method, , searchHierarchy, consumer.
ifHasAnnotation(method, Group.class, true, a -> testResult.getTestCase().setGroup(a.group()));
Hi Team,
From QAF dashboard, I could able to see Group, Product values that I passed in feature file. Similarly I have to pass the same value to my existing dashboard from my custom report java class.
Sample feature file: Feature: Testing QAF integration with Testng Framework @Pre-requisities @dataFile:resources/testdata/login.csv @description:Testing @Product:Lantern Reporting Service @TestID:12345 @author:Anbarasu Murugesan @Group:TestingGroup Scenario: Login using valid credential Given load account data by name "${account}" Given launch application using "${clientType}" "${deviceId}" Given generate three legged oauth
QAF Dashboard:
I tried to create Group.class to get value of annotation @Group:TestingGroup but it is not working as I expected. how to create Group.class to get value that I am passing in feature file package reporter; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Inherited @Retention (RetentionPolicy.RUNTIME) @Target ({ ElementType.TYPE }) public @interface Group { String group() default ""; }
Custom report java class -> passing method,, searchHierarchy, consumer.
ifHasAnnotation(method, Group.class, true, a -> testResult.getTestCase().setGroup(a.group()));