-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1673 enable generateTestResultAttributes using Maven #1681
Conversation
Hi I am still facing issue on this. I am not able to view attributes in testng xml report. Can you please guide me? |
@madhura-75 - You would need to be a bit more elaborate. How about you share a simple sample project that can be used to reproduce the problem and then post it on the TestNG users mailing list https://groups.google.com/g/testng-users |
Hi Krishnan,
I am unable to display attributes like labels, Xraytest key id, requirement
id in my testng xml report, I need to import this report to Xray . Can you
please help me with this. It's been 5 days I am not able to figure out what
is the issue. Below is a code of my test automation.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>EPOSMobileTestFramework</groupId>
<artifactId>MobileTestFramework</artifactId>
<version>1.0-SNAPSHOT</version>
<name>MobileTestFramework</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<!--XRay Properties -->
<!--IN PROFILE ~.m2/settings.xml-->
<!--<xray.jiraURL></xray.jiraURL>
<xray.resultsFormat>JUNIT</xray.resultsFormat>
<xray.username>admin</xray.username>
<xray.password>123qwe</xray.password>-->
<xray.projectKey>CALC</xray.projectKey>
<!--
<xray.testExecKey></xray.testExecKey>
<xray.testPlanKey></xray.testPlanKey>
<xray.testEnvironments></xray.testEnvironments>
<xray.revision></xray.revision>
-->
<xray.surefire.location>${basedir}/target/surefire-reports</xray.surefire.location>
<!--End Xray Properties -->
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.5.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.1.5</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>app.getxray</groupId>
<artifactId>xray-testng-extensions</artifactId>
<version>0.2.0-beta</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>app.getxray</groupId>
<artifactId>xray-maven-plugin</artifactId>
<version>0.7.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<debug>true</debug>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>reporter</name>
<value>org.testng.reporters.XMLReporter:generateTestResultAttributes=true,generateGroupsAttribute=true</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>
testng.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Suite" thread-count="5" verbose="10">
<listeners>
<listener
class-name="EPOSMobileTestFramework.MobileTestFramework.XrayListener"/>
</listeners>
<test thread-count="5" name="Test">
<classes>
<class
name="EPOSMobileTestFramework.MobileTestFramework.PairingTestCases"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Same java code
@test (priority = 1)
@Xraytest(key = "CALC-1", labels="launch")
@requirement(key = "CALC-0001")
public void TES_31953() throws InterruptedException, IOException {
LaunchScreen ls = new LaunchScreen(driver);
DeviceScanScreen dss = new DeviceScanScreen(driver);
CommonObjects cObj = new CommonObjects(driver);
Thread.sleep(6000);
ls.termCondObj.click();
ls.allowDataObj.click();
ls.contObj.click();
Thread.sleep(3000);
try {
if(ls.grntLocObj.isDisplayed()) {
ls.grntLocObj.click();
ls.allowObj.click();
}
} catch (Exception e){
ls.GrantPermissionObj.click();
ls.AllowOnceObj.click();
}
ls.contObj.click();
Thread.sleep(5000);
}
Can you please check and let me know what wrong I am doing.
Thanks
…On Thu, Feb 15, 2024 at 6:41 PM Krishnan Mahadevan ***@***.***> wrote:
@madhura-75 <https://github.com/madhura-75> - You would need to be a bit
more elaborate. How about you share a simple sample project that can be
used to reproduce the problem and then post it on the TestNG users mailing
list https://groups.google.com/g/testng-users
—
Reply to this email directly, view it on GitHub
<#1681 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHEWNG4T7ENUI3UKKBUIY33YTYCOVAVCNFSM4EO4A5XKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJUGYYDMOJVGMZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@madhura-75 - How about you share a simple sample project (either as a zip file or upload the sample into github and share a link of that project) that can be used to reproduce the problem and then post it on the TestNG users mailing list https://groups.google.com/g/testng-users Let's not hijack this Pull Request comments for user support. |
Fixes #1673 enable generateTestResultAttributes using Maven
Did you remember to?
[*] Fix test case(s)
[] Update CHANGES.txt
We encourage pull requests that:
Add new features to TestNG (or)
Fix bugs in TestNG
If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.