com.tupilabs:testng-parser

TestNG Parser

License

License

MIT
Categories

Categories

TestNG Unit Testing
GroupId

GroupId

com.tupilabs
ArtifactId

ArtifactId

testng-parser
Last Version

Last Version

0.5
Release Date

Release Date

Type

Type

jar
Description

Description

com.tupilabs:testng-parser
TestNG Parser
Project Organization

Project Organization

TupiLabs
Source Code Management

Source Code Management

https://github.com/tupilabs/testng-parser

Download testng-parser

How to add to project

<!-- https://jarcasting.com/artifacts/com.tupilabs/testng-parser/ -->
<dependency>
    <groupId>com.tupilabs</groupId>
    <artifactId>testng-parser</artifactId>
    <version>0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.tupilabs/testng-parser/
implementation 'com.tupilabs:testng-parser:0.5'
// https://jarcasting.com/artifacts/com.tupilabs/testng-parser/
implementation ("com.tupilabs:testng-parser:0.5")
'com.tupilabs:testng-parser:jar:0.5'
<dependency org="com.tupilabs" name="testng-parser" rev="0.5">
  <artifact name="testng-parser" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.tupilabs', module='testng-parser', version='0.5')
)
libraryDependencies += "com.tupilabs" % "testng-parser" % "0.5"
[com.tupilabs/testng-parser "0.5"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

testng-parser: A simple TestNG parser

TestNG Parser project with a simple TestNG parser, used by other projects such as Jenkins plug-ins.

Build status

Build Status

Usage example

Below an example of how to use this parser.

ClassLoader cl = TestTestNGParser.class.getClassLoader();
URL url = cl.getResource("com/tupilabs/testng/parser/testng-results.xml");
File file = new File(url.getFile());

List<Suite> suites = null;
try {
    suites = this.parser.parse(file);
} catch (ParserException e) {
    fail("Failed to parse testng file '" + file + "': " + e.getMessage());
}

assertTrue(suite.getName().equals("Command line suite"));

List<Test> tests = suite.getTests();
assertEquals(tests.size(), 1);

Class clazz = classes.get(0);
assertNotNull(clazz);

assertTrue(clazz.getName().equals("br.eti.kinoshita.Test1"));

List<TestMethod> testMethods = clazz.getTestMethods();

TestMethod testMethod = testMethods.get(0);
assertTrue(testMethod.getStatus().equals("PASS"));

Licensing

This project is licensed under MIT License.

Contributing

Fork it, send pull requests or drop us a message :-)

com.tupilabs

TupiLabs

Open Source and Innovation

Versions

Version
0.5
0.4
0.3
0.2
0.1