Skip to content

Commit

Permalink
Deploy to Public
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-cfrd committed Dec 2, 2024
1 parent ce319c2 commit 0557320
Show file tree
Hide file tree
Showing 34 changed files with 1,702 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
© Copyright 2023 Micro Focus or one of its affiliates.
© Copyright 2024 Micro Focus or one of its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const convertedXML = convertJUnitXMLToOctaneXML(xml, buildConfig);
```

## Change log

### 25.1.0
- Fix issue causing skipped test cases to be treated as passed.

### 1.0.1
- Allows conversion from JUnit format XML to ALM Octane format XML via the `convertJUnitXMLToOctaneXML` method.

2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) Copyright 2023 Micro Focus or one of its affiliates.
* (c) Copyright 2024 Micro Focus or one of its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2,765 changes: 1,269 additions & 1,496 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microfocus/alm-octane-test-result-convertion",
"version": "1.0.1",
"version": "25.1.0",
"description": "A NodeJS library for converting different kinds of test reports into ALM Octane format.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -22,15 +22,24 @@
"report",
"junit"
],
"author": "Silviu C. Anton",
"contributors": [
{
"name": "Silviu-Constantin Anton",
"email": "[email protected]"
},
{
"name": "Ovidiu Stefan Popescu",
"email": "[email protected]"
}
],
"license": "Apache-2.0",
"devDependencies": {
"@microfocus/alm-octane-js-rest-sdk": "^16.1.100-1",
"@types/jest": "^29.2.5",
"@types/node": "^18.11.18",
"@types/xml-escape": "^1.1.1",
"@types/xsd-schema-validator": "^0.5.4",
"jest": "^29.5.0",
"jest": "^29.7.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
Expand Down
21 changes: 21 additions & 0 deletions resources/failedAndSkippedTestsExpected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<test_result>
<build build_id="123" job_id="myJob" server_id="serverId"/>
<test_fields>
<test_field type="Test_Level" value="Unit Test"/>
<test_field type="Test_Type" value="Sanity"/>
<test_field type="Framework" value="JUnit"/>
</test_fields>
<test_runs>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testOr_whenBothFalse" status="Passed" duration="0"/>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testAnd_whenOneFalse" status="Passed" duration="0"/>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testAnd_whenBothTrue" status="Passed" duration="0"/>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testFailed" status="Failed" duration="0">
<error type="org.opentest4j.AssertionFailedError:">org.opentest4j.AssertionFailedError:
at me.opopescu.test_octane_github_actions.BooleanCalculatorTest.testFailed(BooleanCalculatorTest.java:27)
</error>
</test_run>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testOr_whenOneTrue" status="Passed" duration="0"/>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testSkipped" status="Skipped" duration="0"/>
<test_run module="" class="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" name="testSkipped2" status="Skipped" duration="0"/>
</test_runs>
</test_result>
74 changes: 74 additions & 0 deletions resources/failedAndSkippedTestsJUnit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0.029" tests="7" errors="0" skipped="2" failures="1">
<properties>
<property name="java.specification.version" value="21"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/test-classes:/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/classes:/home/runner/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.3.2/junit-jupiter-engine-5.3.2.jar:/home/runner/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-engine/1.3.2/junit-platform-engine-1.3.2.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-commons/1.3.2/junit-platform-commons-1.3.2.jar:/home/runner/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar:/home/runner/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.3.2/junit-jupiter-api-5.3.2.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-runner/1.2.0/junit-platform-runner-1.2.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-launcher/1.2.0/junit-platform-launcher-1.2.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-suite-api/1.2.0/junit-platform-suite-api-1.2.0.jar:/home/runner/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/runner/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:src/test/java/:"/>
<property name="java.vm.vendor" value="Eclipse Adoptium"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="os.name" value="Linux"/>
<property name="java.vm.specification.version" value="21"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.boot.library.path" value="/usr/lib/jvm/temurin-21-jdk-amd64/lib"/>
<property name="sun.java.command" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/surefire/surefirebooter18369898721613332125.jar /home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/surefire 2024-11-28T19-10-05_187-jvmRun1 surefire6777542958108367575tmp surefire_09334649928586345297tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/test-classes:/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/classes:/home/runner/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.3.2/junit-jupiter-engine-5.3.2.jar:/home/runner/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-engine/1.3.2/junit-platform-engine-1.3.2.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-commons/1.3.2/junit-platform-commons-1.3.2.jar:/home/runner/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar:/home/runner/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.3.2/junit-jupiter-api-5.3.2.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-runner/1.2.0/junit-platform-runner-1.2.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-launcher/1.2.0/junit-platform-launcher-1.2.0.jar:/home/runner/.m2/repository/org/junit/platform/junit-platform-suite-api/1.2.0/junit-platform-suite-api-1.2.0.jar:/home/runner/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/runner/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:src/test/java/:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/home/runner"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2024-10-15"/>
<property name="java.home" value="/usr/lib/jvm/temurin-21-jdk-amd64"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests"/>
<property name="java.vm.compressedOopsMode" value="32-bit"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="surefire.real.class.path" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests/target/surefire/surefirebooter18369898721613332125.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="21.0.5+11-LTS"/>
<property name="user.name" value="runner"/>
<property name="stdout.encoding" value="UTF-8"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="6.5.0-1025-azure"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-21.0.5+11"/>
<property name="localRepository" value="/home/runner/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/tmp"/>
<property name="java.version" value="21.0.5"/>
<property name="user.dir" value="/home/runner/work/alm-octane-github-actions-tests/alm-octane-github-actions-tests"/>
<property name="os.arch" value="amd64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.library.path" value="/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="stderr.encoding" value="UTF-8"/>
<property name="java.vendor" value="Eclipse Adoptium"/>
<property name="java.vm.version" value="21.0.5+11-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="java.class.version" value="65.0"/>
</properties>
<testcase name="testOr_whenBothFalse" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0.005"/>
<testcase name="testAnd_whenOneFalse" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0.001"/>
<testcase name="testAnd_whenBothTrue" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0.001"/>
<testcase name="testFailed" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0.013">
<failure type="org.opentest4j.AssertionFailedError:">org.opentest4j.AssertionFailedError:
at me.opopescu.test_octane_github_actions.BooleanCalculatorTest.testFailed(BooleanCalculatorTest.java:27)
</failure>
</testcase>
<testcase name="testOr_whenOneTrue" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0"/>
<testcase name="testSkipped" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0">
<skipped message="Assumption failed: assumption is not true" type="org.opentest4j.TestAbortedException">org.opentest4j.TestAbortedException: Assumption failed: assumption is not true
at me.opopescu.test_octane_github_actions.BooleanCalculatorTest.testSkipped(BooleanCalculatorTest.java:70)
</skipped>
</testcase>
<testcase name="testSkipped2" classname="me.opopescu.test_octane_github_actions.BooleanCalculatorTest" time="0">
<skipped>
</skipped>
</testcase>
</testsuite>
12 changes: 6 additions & 6 deletions resources/octaneConfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"server": "",
"sharedSpace": 0,
"workspace": 0,
"user": "",
"password": ""
}
"server": "https://pmo7.almoctane.com",
"sharedSpace": "3001",
"workspace": "1002",
"user": "TestResultsLibJenkins_kdl8ygg71npv7u348okv9yp4v",
"password": "@191119646017652535R"
}
Loading

0 comments on commit 0557320

Please sign in to comment.