Fridrich Strba 2024-10-04 10:22:51 +00:00 committed by Git OBS Bridge
commit 43faf123bd
13 changed files with 1269 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,27 @@
From acd7f374502cbbde54f1dd43cde1c4faa5d4139a Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Wed, 31 May 2017 13:44:36 +0200
Subject: [PATCH 1/4] Avoid accidental javascript in javadoc
---
.../src/main/java/org/testng/xml/TestNGContentHandler.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java b/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
index a1f64c00..74c1e10a 100644
--- a/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
+++ b/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
@@ -328,7 +328,9 @@ public class TestNGContentHandler extends DefaultHandler {
}
}
- /** Parse <script> */
+ /**
+ * Parse &lt;script&gt;
+ */
private void xmlScript(boolean start, Attributes attributes) {
if (start) {
m_currentLanguage = attributes.getValue("language");
--
2.44.0

View File

@ -0,0 +1,38 @@
From acbea8349bb443e867371bbfb5eb2e7f84f53784 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Wed, 18 Jul 2018 15:57:49 +0200
Subject: [PATCH 2/4] Replace bundled jquery with CDN link
---
testng-core/src/main/java/org/testng/reporters/jq/Main.java | 1 -
testng-core/src/main/resources/org/testng/header | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/testng-core/src/main/java/org/testng/reporters/jq/Main.java b/testng-core/src/main/java/org/testng/reporters/jq/Main.java
index 7c6a959b..82ef710e 100644
--- a/testng-core/src/main/java/org/testng/reporters/jq/Main.java
+++ b/testng-core/src/main/java/org/testng/reporters/jq/Main.java
@@ -20,7 +20,6 @@ public class Main implements IReporter {
private static final String TESTNG_RESOURCE_PREFIX = "/org/testng/";
private static final String[] RESOURCES =
new String[] {
- "jquery-3.6.0.min.js",
"testng-reports.css",
"testng-reports.js",
"testng-reports1.css",
diff --git a/testng-core/src/main/resources/org/testng/header b/testng-core/src/main/resources/org/testng/header
index d1573f93..29ed3e16 100644
--- a/testng-core/src/main/resources/org/testng/header
+++ b/testng-core/src/main/resources/org/testng/header
@@ -7,7 +7,7 @@
<link type="text/css" href="testng-reports1.css" rel="stylesheet" id="ultra" />
<link type="text/css" href="testng-reports.css" rel="stylesheet" id="retro" disabled="false"/>
- <script type="text/javascript" src="jquery-3.6.0.min.js"></script>
+ <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="testng-reports.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
--
2.44.0

View File

@ -0,0 +1,445 @@
From 9b3e583a38c5c7cdea761e687ee07dfdca6b2e40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Tue, 16 Apr 2024 09:16:42 +0200
Subject: [PATCH 3/4] Preserve Java 8 compatibility
---
.../main/java/org/testng/util/Strings.java | 2 +-
.../org/testng/internal/PackageUtils.java | 13 ++++--
.../main/java/org/testng/internal/Utils.java | 4 +-
.../protocols/BundledResourceProcessor.java | 12 ++++--
.../internal/protocols/FileProcessor.java | 11 +++--
.../src/main/java/org/testng/SuiteRunner.java | 3 +-
.../src/main/java/org/testng/TestRunner.java | 18 ++++----
.../testng/internal/DataProviderLoader.java | 13 +++++-
.../org/testng/internal/NoOpTestClass.java | 41 ++++++++++---------
.../main/java/org/testng/internal/Yaml.java | 2 +-
.../org/testng/reporters/VerboseReporter.java | 10 ++++-
.../org/testng/xml/TestNGContentHandler.java | 11 +++--
12 files changed, 92 insertions(+), 48 deletions(-)
diff --git a/testng-collections/src/main/java/org/testng/util/Strings.java b/testng-collections/src/main/java/org/testng/util/Strings.java
index 452f56f2..5ec081bf 100644
--- a/testng-collections/src/main/java/org/testng/util/Strings.java
+++ b/testng-collections/src/main/java/org/testng/util/Strings.java
@@ -33,7 +33,7 @@ public final class Strings {
if (list.isEmpty()) {
return true;
}
- return list.stream().allMatch(t -> t == null || t.isBlank());
+ return list.stream().allMatch(t -> t == null || t.trim().isEmpty());
}
private static final Map<String, String> ESCAPE_HTML_MAP = Maps.newLinkedHashMap();
diff --git a/testng-core-api/src/main/java/org/testng/internal/PackageUtils.java b/testng-core-api/src/main/java/org/testng/internal/PackageUtils.java
index 6669fb6a..e45ad73c 100644
--- a/testng-core-api/src/main/java/org/testng/internal/PackageUtils.java
+++ b/testng-core-api/src/main/java/org/testng/internal/PackageUtils.java
@@ -1,12 +1,12 @@
package org.testng.internal;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import java.io.File;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
@@ -114,7 +114,7 @@ public class PackageUtils {
private static Function<ClassLoader, Stream<URL>> asURLs(String packageDir) {
return cl -> {
try {
- Iterator<URL> iterator = cl.getResources(packageDir).asIterator();
+ Iterator<URL> iterator = Collections.list(cl.getResources(packageDir)).iterator();
return StreamSupport.stream(
Spliterators.spliteratorUnknownSize(iterator, Spliterator.ORDERED), false);
} catch (IOException e) {
@@ -129,7 +129,12 @@ public class PackageUtils {
return true;
}
- String fileName = URLDecoder.decode(url.getFile(), UTF_8);
+ String fileName;
+ try {
+ fileName = URLDecoder.decode(url.getFile(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ fileName = new String();
+ }
for (String classpathFrag : classpathFragments) {
String path = classpathFrag + lastFragment;
diff --git a/testng-core-api/src/main/java/org/testng/internal/Utils.java b/testng-core-api/src/main/java/org/testng/internal/Utils.java
index 174c8ef3..30cf8b30 100644
--- a/testng-core-api/src/main/java/org/testng/internal/Utils.java
+++ b/testng-core-api/src/main/java/org/testng/internal/Utils.java
@@ -275,7 +275,7 @@ public final class Utils {
LOG.error("Couldn't find resource on the class path: " + resourceName);
return;
}
- try (inputStream) {
+ try {
try (FileOutputStream outputStream = new FileOutputStream(file)) {
int nread;
byte[] buffer = new byte[4096];
@@ -283,6 +283,8 @@ public final class Utils {
outputStream.write(buffer, 0, nread);
}
}
+ } finally {
+ inputStream.close();
}
}
diff --git a/testng-core-api/src/main/java/org/testng/internal/protocols/BundledResourceProcessor.java b/testng-core-api/src/main/java/org/testng/internal/protocols/BundledResourceProcessor.java
index 79d0626b..b48f7523 100644
--- a/testng-core-api/src/main/java/org/testng/internal/protocols/BundledResourceProcessor.java
+++ b/testng-core-api/src/main/java/org/testng/internal/protocols/BundledResourceProcessor.java
@@ -1,7 +1,6 @@
package org.testng.internal.protocols;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
+import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLConnection;
@@ -33,8 +32,13 @@ class BundledResourceProcessor extends Processor {
Method thisMethod = url.openConnection().getClass().getDeclaredMethod("getFileURL", params);
Object[] paramsObj = {};
URL fileUrl = (URL) thisMethod.invoke(connection, paramsObj);
- return findClassesInDirPackage(
- packageOnly, included, excluded, URLDecoder.decode(fileUrl.getFile(), UTF_8), recursive);
+ String decoded;
+ try {
+ decoded = URLDecoder.decode(fileUrl.getFile(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ decoded = new String();
+ }
+ return findClassesInDirPackage(packageOnly, included, excluded, decoded, recursive);
} catch (Exception ex) {
// ignore - probably not an Eclipse OSGi bundle
}
diff --git a/testng-core-api/src/main/java/org/testng/internal/protocols/FileProcessor.java b/testng-core-api/src/main/java/org/testng/internal/protocols/FileProcessor.java
index 12b93a0e..e85fdc88 100644
--- a/testng-core-api/src/main/java/org/testng/internal/protocols/FileProcessor.java
+++ b/testng-core-api/src/main/java/org/testng/internal/protocols/FileProcessor.java
@@ -1,7 +1,6 @@
package org.testng.internal.protocols;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
+import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.List;
@@ -10,11 +9,17 @@ class FileProcessor extends Processor {
@Override
public List<String> process(Input input, URL url) {
+ String decoded;
+ try {
+ decoded = URLDecoder.decode(url.getFile(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ decoded = new String();
+ }
return findClassesInDirPackage(
input.getPackageWithoutWildCards(),
input.getIncluded(),
input.getExcluded(),
- URLDecoder.decode(url.getFile(), UTF_8),
+ decoded,
input.isRecursive());
}
}
diff --git a/testng-core/src/main/java/org/testng/SuiteRunner.java b/testng-core/src/main/java/org/testng/SuiteRunner.java
index 452e5711..dfa87c80 100644
--- a/testng-core/src/main/java/org/testng/SuiteRunner.java
+++ b/testng-core/src/main/java/org/testng/SuiteRunner.java
@@ -818,8 +818,7 @@ public class SuiteRunner implements ISuite, ISuiteRunnerListener {
TestListenersContainer(List<ITestListener> listeners, ITestListener exitCodeListener) {
this.listeners.addAll(listeners);
- this.exitCodeListener =
- Objects.requireNonNullElseGet(exitCodeListener, () -> new ITestListener() {});
+ this.exitCodeListener = exitCodeListener != null ? exitCodeListener : new ITestListener() {};
}
}
}
diff --git a/testng-core/src/main/java/org/testng/TestRunner.java b/testng-core/src/main/java/org/testng/TestRunner.java
index 8f8085c0..b051d8ac 100644
--- a/testng-core/src/main/java/org/testng/TestRunner.java
+++ b/testng-core/src/main/java/org/testng/TestRunner.java
@@ -7,6 +7,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
@@ -557,11 +558,13 @@ public class TestRunner
}
private static ITestNGMethod[] beforeClassConfigMethods(ITestClass tc) {
- return ITestClassConfigInfo.allBeforeClassMethods(tc).toArray(ITestNGMethod[]::new);
+ List<ITestNGMethod> methodsList = ITestClassConfigInfo.allBeforeClassMethods(tc);
+ return methodsList.toArray(new ITestNGMethod[methodsList.size()]);
}
private static ITestNGMethod[] afterClassConfigMethods(ITestClass tc) {
- return ITestClassConfigInfo.allAfterClassMethods(tc).toArray(ITestNGMethod[]::new);
+ List<ITestNGMethod> methodsList = ITestClassConfigInfo.allAfterClassMethods(tc);
+ return methodsList.toArray(new ITestNGMethod[methodsList.size()]);
}
private ITestNGMethod[] computeAndGetAllTestMethods() {
@@ -1045,11 +1048,12 @@ public class TestRunner
@Override
public List<IConfigurationListener> getConfigurationListeners() {
- return m_configurationListeners.stream()
- .map(ClassBasedWrapper::wrap)
- .distinct()
- .map(ClassBasedWrapper::unWrap)
- .collect(Collectors.toUnmodifiableList());
+ return Collections.unmodifiableList(
+ m_configurationListeners.stream()
+ .map(ClassBasedWrapper::wrap)
+ .distinct()
+ .map(ClassBasedWrapper::unWrap)
+ .collect(Collectors.toList()));
}
private void logFailedTest(ITestResult tr, boolean withinSuccessPercentage) {
diff --git a/testng-core/src/main/java/org/testng/internal/DataProviderLoader.java b/testng-core/src/main/java/org/testng/internal/DataProviderLoader.java
index 8f27cf32..85aeb936 100644
--- a/testng-core/src/main/java/org/testng/internal/DataProviderLoader.java
+++ b/testng-core/src/main/java/org/testng/internal/DataProviderLoader.java
@@ -2,6 +2,8 @@ package org.testng.internal;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
import org.testng.log4testng.Logger;
public class DataProviderLoader extends ClassLoader {
@@ -29,7 +31,16 @@ public class DataProviderLoader extends ClassLoader {
byte[] classBytes;
try {
- classBytes = in.readAllBytes();
+ List<Byte> byteList = new ArrayList<>();
+ int byteRead;
+ while ((byteRead = in.read()) != -1) {
+ byteList.add((byte) byteRead);
+ }
+ classBytes = new byte[byteList.size()];
+ int i = 0;
+ for (Byte b : byteList) {
+ classBytes[i++] = b;
+ }
} catch (IOException e) {
throw new ClassNotFoundException("ERROR reading class file" + e);
}
diff --git a/testng-core/src/main/java/org/testng/internal/NoOpTestClass.java b/testng-core/src/main/java/org/testng/internal/NoOpTestClass.java
index bb3feb3b..dc406f92 100644
--- a/testng-core/src/main/java/org/testng/internal/NoOpTestClass.java
+++ b/testng-core/src/main/java/org/testng/internal/NoOpTestClass.java
@@ -1,6 +1,7 @@
package org.testng.internal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.testng.ITestClass;
import org.testng.ITestNGMethod;
@@ -39,16 +40,16 @@ public class NoOpTestClass implements ITestClass, IObject {
public NoOpTestClass(ITestClass testClass) {
m_testClass = testClass.getRealClass();
- m_beforeSuiteMethods = List.of(testClass.getBeforeSuiteMethods());
- m_beforeTestConfMethods = List.of(testClass.getBeforeTestConfigurationMethods());
+ m_beforeSuiteMethods = Arrays.asList(testClass.getBeforeSuiteMethods());
+ m_beforeTestConfMethods = Arrays.asList(testClass.getBeforeTestConfigurationMethods());
m_beforeGroupsMethods = testClass.getBeforeGroupsMethods();
- m_beforeClassMethods = List.of(testClass.getBeforeClassMethods());
- m_beforeTestMethods = List.of(testClass.getBeforeTestMethods());
- m_afterSuiteMethods = List.of(testClass.getAfterSuiteMethods());
- m_afterTestConfMethods = List.of(testClass.getAfterTestConfigurationMethods());
- m_afterGroupsMethods = List.of(testClass.getAfterGroupsMethods());
- m_afterClassMethods = List.of(testClass.getAfterClassMethods());
- m_afterTestMethods = List.of(testClass.getAfterTestMethods());
+ m_beforeClassMethods = Arrays.asList(testClass.getBeforeClassMethods());
+ m_beforeTestMethods = Arrays.asList(testClass.getBeforeTestMethods());
+ m_afterSuiteMethods = Arrays.asList(testClass.getAfterSuiteMethods());
+ m_afterTestConfMethods = Arrays.asList(testClass.getAfterTestConfigurationMethods());
+ m_afterGroupsMethods = Arrays.asList(testClass.getAfterGroupsMethods());
+ m_afterClassMethods = Arrays.asList(testClass.getAfterClassMethods());
+ m_afterTestMethods = Arrays.asList(testClass.getAfterTestMethods());
m_instances = IObject.objects(testClass, true);
m_instanceHashes = IObject.instanceHashCodes(testClass);
m_xmlTest = testClass.getXmlTest();
@@ -56,35 +57,35 @@ public class NoOpTestClass implements ITestClass, IObject {
}
public void setBeforeTestMethods(ITestNGMethod[] beforeTestMethods) {
- m_beforeTestMethods = List.of(beforeTestMethods);
+ m_beforeTestMethods = Arrays.asList(beforeTestMethods);
}
public void setAfterTestMethod(ITestNGMethod[] afterTestMethods) {
- m_afterTestMethods = List.of(afterTestMethods);
+ m_afterTestMethods = Arrays.asList(afterTestMethods);
}
/** @return Returns the afterClassMethods. */
@Override
public ITestNGMethod[] getAfterClassMethods() {
- return m_afterClassMethods.toArray(ITestNGMethod[]::new);
+ return m_afterClassMethods.toArray(new ITestNGMethod[m_afterClassMethods.size()]);
}
/** @return Returns the afterTestMethods. */
@Override
public ITestNGMethod[] getAfterTestMethods() {
- return m_afterTestMethods.toArray(ITestNGMethod[]::new);
+ return m_afterTestMethods.toArray(new ITestNGMethod[m_afterTestMethods.size()]);
}
/** @return Returns the beforeClassMethods. */
@Override
public ITestNGMethod[] getBeforeClassMethods() {
- return m_beforeClassMethods.toArray(ITestNGMethod[]::new);
+ return m_beforeClassMethods.toArray(new ITestNGMethod[m_beforeClassMethods.size()]);
}
/** @return Returns the beforeTestMethods. */
@Override
public ITestNGMethod[] getBeforeTestMethods() {
- return m_beforeTestMethods.toArray(ITestNGMethod[]::new);
+ return m_beforeTestMethods.toArray(new ITestNGMethod[m_beforeTestMethods.size()]);
}
/** @return Returns the testMethods. */
@@ -95,22 +96,22 @@ public class NoOpTestClass implements ITestClass, IObject {
@Override
public ITestNGMethod[] getBeforeSuiteMethods() {
- return m_beforeSuiteMethods.toArray(ITestNGMethod[]::new);
+ return m_beforeSuiteMethods.toArray(new ITestNGMethod[m_beforeSuiteMethods.size()]);
}
@Override
public ITestNGMethod[] getAfterSuiteMethods() {
- return m_afterSuiteMethods.toArray(ITestNGMethod[]::new);
+ return m_afterSuiteMethods.toArray(new ITestNGMethod[m_afterSuiteMethods.size()]);
}
@Override
public ITestNGMethod[] getBeforeTestConfigurationMethods() {
- return m_beforeTestConfMethods.toArray(ITestNGMethod[]::new);
+ return m_beforeTestConfMethods.toArray(new ITestNGMethod[m_beforeTestConfMethods.size()]);
}
@Override
public ITestNGMethod[] getAfterTestConfigurationMethods() {
- return m_afterTestConfMethods.toArray(ITestNGMethod[]::new);
+ return m_afterTestConfMethods.toArray(new ITestNGMethod[m_afterTestConfMethods.size()]);
}
/** @return all @Configuration methods that should be invoked before certain groups */
@@ -122,7 +123,7 @@ public class NoOpTestClass implements ITestClass, IObject {
/** @return all @Configuration methods that should be invoked after certain groups */
@Override
public ITestNGMethod[] getAfterGroupsMethods() {
- return m_afterGroupsMethods.toArray(ITestNGMethod[]::new);
+ return m_afterGroupsMethods.toArray(new ITestNGMethod[m_afterGroupsMethods.size()]);
}
/** @see org.testng.internal.IObject#getInstanceHashCodes() */
diff --git a/testng-core/src/main/java/org/testng/internal/Yaml.java b/testng-core/src/main/java/org/testng/internal/Yaml.java
index da3d2141..eb0e37f1 100644
--- a/testng-core/src/main/java/org/testng/internal/Yaml.java
+++ b/testng-core/src/main/java/org/testng/internal/Yaml.java
@@ -140,7 +140,7 @@ public final class Yaml {
/** Convert a XmlTest into YAML */
private static void toYaml(StringBuilder result, XmlTest t) {
- String sp2 = " ".repeat(2);
+ String sp2 = new String(" ");
result.append(" ").append("- name: ").append(t.getName()).append("\n");
maybeAdd(result, sp2, "verbose", t.getVerbose(), XmlSuite.DEFAULT_VERBOSE);
diff --git a/testng-core/src/main/java/org/testng/reporters/VerboseReporter.java b/testng-core/src/main/java/org/testng/reporters/VerboseReporter.java
index 450c5525..747802fc 100644
--- a/testng-core/src/main/java/org/testng/reporters/VerboseReporter.java
+++ b/testng-core/src/main/java/org/testng/reporters/VerboseReporter.java
@@ -206,7 +206,7 @@ public class VerboseReporter implements IConfigurationListener, ITestListener {
sb.append(" ms");
if (!Utils.isStringEmpty(tm.getDescription())) {
sb.append("\n");
- sb.append(" ".repeat(Math.max(0, identLevel)));
+ sb.append(repeatString(" ", Math.max(0, identLevel)));
sb.append(tm.getDescription());
}
if (tm.getInvocationCount() > 1) {
@@ -271,6 +271,14 @@ public class VerboseReporter implements IConfigurationListener, ITestListener {
return buf.toString();
}
+ private static String repeatString(String str, int count) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < count; i++) {
+ sb.append(str);
+ }
+ return sb.toString();
+ }
+
@Override
public String toString() {
return "VerboseReporter{" + "suiteName=" + suiteName + '}';
diff --git a/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java b/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
index 74c1e10a..463d8467 100644
--- a/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
+++ b/testng-core/src/main/java/org/testng/xml/TestNGContentHandler.java
@@ -5,6 +5,7 @@ import static org.testng.internal.Utils.isStringBlank;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
@@ -12,7 +13,6 @@ import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
-import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -158,8 +158,13 @@ public class TestNGContentHandler extends DefaultHandler {
private static boolean isMalformedFileSystemBasedSystemId(String systemId) {
try {
-
- URL url = new URL(URLDecoder.decode(systemId, StandardCharsets.UTF_8).trim());
+ String decoded;
+ try {
+ decoded = URLDecoder.decode(systemId, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ decoded = new String();
+ }
+ URL url = new URL(decoded.trim());
if (url.getProtocol().equals("file")) {
File file = new File(url.getFile());
boolean isDirectory = file.isDirectory();
--
2.44.0

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/cbeust/testng.git</param>
<param name="revision">7.10.2</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="exclude">bin*</param>
<param name="exclude">gradle*</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

77
testng-7.10.1.pom Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.1</version>
<name>testng</name>
<description>Testing framework for Java</description>
<url>https://testng.org</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<id>cbeust</id>
<name>Cedric Beust</name>
<email>cedric@beust.com</email>
</developer>
<developer>
<id>juherr</id>
<name>Julien Herr</name>
<email>julien@herr.fr</email>
</developer>
<developer>
<id>krmahadevan</id>
<name>Krishnan Mahadevan</name>
<email>krishnan.mahadevan1978@gmail.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/testng-team/testng.git</connection>
<url>https://github.com/testng-team/testng.git</url>
</scm>
<issueManagement>
<system>Github</system>
<url>https://github.com/testng-team/testng/issues</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.82</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.7.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

BIN
testng-7.10.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

77
testng-7.10.2.pom Normal file
View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<name>testng</name>
<description>Testing framework for Java</description>
<url>https://testng.org</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<id>cbeust</id>
<name>Cedric Beust</name>
<email>cedric@beust.com</email>
</developer>
<developer>
<id>juherr</id>
<name>Julien Herr</name>
<email>julien@herr.fr</email>
</developer>
<developer>
<id>krmahadevan</id>
<name>Krishnan Mahadevan</name>
<email>krishnan.mahadevan1978@gmail.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/testng-team/testng.git</connection>
<url>https://github.com/testng-team/testng.git</url>
</scm>
<issueManagement>
<system>Github</system>
<url>https://github.com/testng-team/testng/issues</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.82</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.7.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

BIN
testng-7.10.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

168
testng-build.xml Normal file
View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="testng" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="org.testng"/>
<property name="project.artifactId" value="testng"/>
<property name="project.name" value="TestNG"/>
<property name="project.version" value="7.10.2"/>
<property name="project.description" value="${project.name} is a testing framework."/>
<property name="compiler.release" value="8"/>
<property name="compiler.source" value="1.${compiler.release}"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="testng/src/main/java"/>
<property name="build.srcDirCoreApi" value="testng-core-api/src/main/java"/>
<property name="build.srcDirReflectionUtils" value="testng-reflection-utils/src/main/java"/>
<property name="build.srcDirAsserts" value="testng-asserts/src/main/java"/>
<property name="build.srcDirTestOsgi" value="testng-test-osgi/src/main/java"/>
<property name="build.srcDirTestKit" value="testng-test-kit/src/main/java"/>
<property name="build.srcDirRunnerApi" value="testng-runner-api/src/main/java"/>
<property name="build.srcDirCollections" value="testng-collections/src/main/java"/>
<property name="build.srcDirCore" value="testng-core/src/main/java"/>
<property name="build.resourceDir" value="testng/src/main/resources"/>
<property name="build.resourceDirCoreApi" value="testng-core-api/src/main/resources"/>
<property name="build.resourceDirReflectionUtils" value="testng-reflection-utils/src/main/resources"/>
<property name="build.resourceDirAsserts" value="testng-asserts/src/main/resources"/>
<property name="build.resourceDirTestOsgi" value="testng-test-osgi/src/main/resources"/>
<property name="build.resourceDirTestKit" value="testng-test-kit/src/main/resources"/>
<property name="build.resourceDirRunnerApi" value="testng-runner-api/src/main/resources"/>
<property name="build.resourceDirCollections" value="testng-collections/src/main/resources"/>
<property name="build.resourceDirCore" value="testng-core/src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<!-- ant beust-jcommander bsh2/bsh google-guice jsr-305 junit snakeyaml -->
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
encoding="utf-8"
optimize="false"
deprecation="true"
release="${compiler.release}"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDirCoreApi}"/>
<pathelement location="${build.srcDirReflectionUtils}"/>
<pathelement location="${build.srcDirAsserts}"/>
<pathelement location="${build.srcDirTestKit}"/>
<pathelement location="${build.srcDirRunnerApi}"/>
<pathelement location="${build.srcDirCollections}"/>
<pathelement location="${build.srcDirCore}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDirCore}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDirCoreApi}:${build.srcDirReflectionUtils}:${build.srcDirAsserts}:${build.srcDirTestKit}:${build.srcDirRunnerApi}:${build.srcDirCollections}:${build.srcDirCore}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="utf-8"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Automatic-Module-Name" value="org.testng"/>
<attribute name="Bundle-Description" value="${project.description}"/>
<attribute name="Bundle-License" value="http://apache.org/licenses/LICENSE-2.0"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.name}"/>
<attribute name="Bundle-SymbolicName" value="${project.groupId}"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="org.testng,org.testng.annotations,org.testng.asserts,org.testng.collections,org.testng.internal,org.testng.internal.annotations,org.testng.internal.collections,org.testng.internal.invokers,org.testng.internal.invokers.objects,org.testng.internal.objects,org.testng.internal.objects.pojo,org.testng.internal.reflect,org.testng.internal.thread,org.testng.internal.thread.graph,org.testng.log,org.testng.log4testng,org.testng.reporters,org.testng.reporters.jq,org.testng.reporters.util,org.testng.thread,org.testng.util,org.testng.xml,org.testng.xml.internal"/>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-Url" value="https://testng.org"/>
<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
<attribute name="Implementation-Vendor" value="${project.name}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="Import-Package" value="*;resolution:=optional,bsh.*;version=&quot;[2.0.0,3.0.0)&quot;;resolution:=optional,com.beust.jcommander.*;version=&quot;[1.7.0,3.0.0)&quot;;resolution:=optional,com.google.inject.*;version=&quot;[1.2,1.3)&quot;;resolution:=optional,org.yaml.*;version=&quot;[1.6,2.0)&quot;;resolution:=optional"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
<attribute name="Specification-Title" value="${project.name}"/>
<attribute name="Specification-Vendor" value="${project.name}"/>
<attribute name="Specification-Version" value="${project.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

297
testng.changes Normal file
View File

@ -0,0 +1,297 @@
-------------------------------------------------------------------
Fri Oct 4 10:19:26 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 7.10.2
* Changes
+ GITHUB-3117: ListenerComparator doesn't work
-------------------------------------------------------------------
Tue Apr 16 13:27:19 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 7.10.1
* Changes of 7.10.1
+ Fix for #3110
* Changes of 7.10.0
+ Clean-up deprecated code
+ Minor discrepancy fixes
+ Deleting TestNG eclipse plugin specific classes
+ Code clean-up
+ Remove deprecated JUnit related support in TestNG
+ Handle exceptions in emailable Reporter
+ Add wrapperbot and update workflow order
+ Support ITestNGFactory customisation
+ Streamline data provider listener invocation
+ Streamline Guice Module creation in concurrency.
+ Copy test result attributes when unexpected failures
+ chore: use explicit dependency versions instead of
refreshVersions
+ Remove Ant
+ Support ordering of listeners
+ Add errorprone
+ Allow custom thread pool executors to be wired in.
+ Allow data providers to be non cacheable
+ Use Locks instead of synchronised keyword
+ Document pgp artifact signing keys
+ Add Unique Id for all test class instances
+ Adding issue management workflows
+ Map object to configurations
+ Allow listeners to be disabled at runtime
+ Streamline Data Provider execution
+ Test case failure
+ Honour inheritance when parsing listener factories
+ Fixing flaky tests
+ Tweaks around accessing SuiteResult
+ Streamline random generation
+ Minor refactoring around RunOrder enum
+ Streamline dependencies for configurations
* Changes of 7.9.0
+ GitHub 2913
+ Test Results as artifacts for failed runs
+ Minor code clean-ups
+ Fixing the Github CI yaml file
+ Fixing data races
+ Dont honour params specified in suite-file tag
+ Decouple SuiteRunner and TestRunner
+ Disable Native DI for BeforeSuite methods
+ Streamline running Parallel Dataproviders+retries
+ Remove extra whitespace in log for
Configuration.createMethods()
+ Added the link for TestNG Documentation's GitHub Repo in
README.md
+ FirstTimeOnlyConfig methods + Listener invocations
+ #2974: Add overrideGroupsFromCliInParentChildXml test
+ Ensure thread safety for attribute access
+ Add @inherited to the Listeners annotation
+ Restrict Group inheritance to Before|AfterGroups
+ Ensure ITestResult injected to @AfterMethod is apt
+ Support suite level thread pools for data provider
+ Minor Code tweaks
+ Favour CompletableFuture instead of PoolService
+ Favour FutureTask for concurrency support
+ Shared Threadpool for normal/datadriven tests.
+ Abort for invalid combinations
* Changes of 7.8.0
+ XmlTest index is not set for test suites invoked with YAML
+ Listener's onAfterClass is called before @afterclass
configuration methods are executed.
+ After upgrading to TestNG 7.5.0, setting ITestResult.status
to FAILURE doesn't fail the test anymore
+ JUnitReportReporter should capture the test case output at
the test case level
+ [Feature] Allow test classes to define "configfailurepolicy"
at a per class level
+ TestNG.xml doesn't honour Parallel value of a clone
+ before configuration and before invocation should be 'SKIP'
when beforeMethod is 'skip'
+ Test listeners specified in parent testng.xml file are not
included in testng-failed.xml file
+ Discrepancies with DataProvider and Retry of failed tests
+ Skipped Tests with DataProvider appear as failed
+ testng-results xml reports config skips from base classes as
ignored
+ Feature: Check that specific object present in List
+ Upgrade snakeyaml to 2.0
+ [Feature] Not exception but warning if some (not all) of the
given test names are not found in suite files.
+ [Feature] Generate testng-results.xml per test suite
* Changes of 7.7.1
+ Streamline overloaded assertion methods for Groovy
* Changes of 7.7.0
+ Replace FindBugs by SpotBugs
+ Gradle: Drop forUseAtConfigurationTime()
+ Added ability to provide custom message to
assertThrows\expectThrows methods
+ Fix issue 2801 - Only resolve hostname once
+ [SECURITY] Fix Zip Slip Vulnerability (bsc#1205628,
CVE-2022-4065)
+ GITHUB-2807 - Failsafe buildStackTrace
+ Prevent overlogging of debug msgs in Graph impl
+ Streamline dataprovider invoking in abstract classes
+ Streamline TestResult due to expectedExceptions
+ Unexpected test runs count with retry analyzer
+ Make PackageUtils compliant with JPMS
+ Ability to retry a data provider during failures
+ Refactoring
+ Fixing bug with DataProvider retry
+ Add config key for callback discrepancy behavior
+ Upgrading versions
+ Fix #2770: FileAlreadyExistsException on copy
+ JarFileUtils.delete(File f) throw actual exception (instead
of FileNotFound) when file cannot be deleted #2825
+ GITHUB-2830 - Failsafe parameter.toString
+ Changing assertion message of the osgitest
+ hidden spotbugs in release #2829
+ Enhancing the Matrix
+ Avoid Compilation errors on Semeru JDK flavour.
+ Add addition yml extension
+ Support getting dependencies info for a test
+ Honour regex in dependsOnMethods
+ Ensure All tests run all the time
+ Deprecate support for running Spock Tests
+ Streamline dependsOnMethods for configurations
+ Ensure ITestContext available for JUnit4 tests
+ Deprecate support for running JUnit tests
* Changes of 7.6.1
+ Fix Files.copy() such that parent dirs are created
+ Remove deprecated utility methods
+ Fix typos
* Changes of 7.6.0
+ Remove redundant Parameter implementation
+ Upgrade to JDK11
+ Move SimpleBaseTest to be Kotlin based
+ Restore testnames when using suites in suite.
+ Moving ClassHelperTests into Kotlin
+ IHookable and IConfigurable callback discrepancy
+ Minor refactoring
+ Add additional condition for assertEqualsNoOrder
+ beforeConfiguration() listener method should be invoked for
skipped configurations as well
+ #2734 keep the initial order of listeners
+ SuiteRunner could not be initial by default Configuration
+ Enable Dataprovider failures to be considered.
+ BeforeGroups should run before any matched test
+ Fix possible StringIndexOutOfBoundsException exception in
XmlReporter
+ DataProvider: possibility to unload dataprovider class, when
done with it
+ fix possibilty that AfterGroups method is invoked before all
tests
+ fix equals implementation for WrappedTestNGMethod
+ Upgrade dependencies, Upgrade to JDK17
+ Wire-In listeners consistently
+ Streamline AfterClass invocation
+ Show FQMN for tests in console
+ Fix 2725
- Modified patches:
* 0001-Avoid-accidental-javascript-in-javadoc.patch
* 0002-Replace-bundled-jquery-with-CDN-link.patch
+ regenerate for the current version
- Added patch:
* 0003-Preserve-Java-8-compatibility.patch
+ restore the possibility to build with --release 8
- Removed patches:
* 0003-Upgrade-snakeyaml-to-2.0.patch
* 0004-vuln-fix-Zip-Slip-Vulnerability.patch
+ integrated in this version
-------------------------------------------------------------------
Mon Apr 15 18:07:44 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Modified patches:
* 0001-Avoid-accidental-javascript-in-javadoc.patch
* 0002-Replace-bundled-jquery-with-CDN-link.patch
* testng-CVE-2022-4065.patch ->
0004-vuln-fix-Zip-Slip-Vulnerability.patch
+ re-cherry-pick and rediff in git
- Added patch:
* 0003-Upgrade-snakeyaml-to-2.0.patch
+ Fix build against snakeyaml >= 2.0
-------------------------------------------------------------------
Wed Feb 21 17:12:29 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Tue Nov 22 12:13:04 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* testng-CVE-2022-4065.patch
+ Issues in sanitization of zip files could lead to path
traversal and potentially code execution (bsc#1205628,
CVE-2022-4065)
-------------------------------------------------------------------
Wed Apr 27 13:42:54 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 7.4.0
* Features:
+ Ability to be notified when a data provider fails, through
a TestNG listener.
TestNG already has a listener that will let you plug in your
callbacks for the following with respect to a data provider
(implement org.testng.IDataProviderListener interface)
You can now use this listener to be notified when a data
provider fails as well.
+ Add the ability to override explicitly included test methods
if they belong to any excluded groups via the configuration
property : overrideIncludedMethods
+ Reduced memory foot print when trying to run tests with
larger projects.
This is now a toggle feature which can be enabled via the
JVM argument: -Dtestng.memory.friendly=true
* Bug fixes:
+ GITHUB-2459: Support configurable start time - emailable
report
+ GITHUB-2467: XmlTest does not copy the xmlClasses during clone
+ GITHUB-2469: Parameters added in XmlTest during
AlterSuiteListener not available in SuiteListener
+ GITHUB-2296: Fix for assertEquals not working for sets as
order is not guaranteed
+ GITHUB-2465: Fix bux where Strings.join returns empty String
+ GITHUB-1632: throwing SkipException sets iTestResult status to
Failure instead of Skip
+ GITHUB-2456: Add onDataProviderFailure listener
+ GITHUB-2445: NPE in FailedReporter.java With Tests Created in
Factory
+ GITHUB-2428: Configuration methods have the same test class
instance when @Factory is being used
+ GITHUB-2440: Fixed an issue when case timeout returned an
incorrect exception and effect the next other test case
+ GITHUB-2407: Adds "overrideIncludedMethods" to the global
config as a command-line argument, which excludes explicitly
included test methods if they belong to any excluded groups
+ GITHUB-2432: Rework MethodInheritance.fixMethodInheritance to
"soft" dependencies
+ GITHUB-2429: Seggregate Dependency Injection out as a clear
implementation
+ GITHUB-2435: getParameterIndex() always return 0 in test
listener
+ GITHUB-2406: TestNG 7.3.0 transitive vulnerability
CVE-2020-11022 and CVE-2020-11023 due to JQuery 3.4.1
+ GITHUB-2405: Regression: Using TestNG via Maven breaks when
optional Guice dependency is unavailable
+ GITHUB-2427: Guice module (suite parent-module and test
module) configure() method is called multiple times
+ GITHUB-2419: TestNG JUnit reports are not valid if system
output contains XML tags
+ GITHUB-188: suite parallel="methods" does not work when there
are multiple <test> tags in the testng.xml
+ GITHUB-346: When a method is annotated with both BeforeGroups
and AfterGroups only AfterGroup is executed
+ GITHUB-2403: Suite.xml files attempt to make web request when
suite references standard TestNG DTD using HTTP
+ GITHUB-2385: Make @Listeners can work for implemented
interfaces and Inherited class
+ GITHUB-2053: MethodHelper.collectAndOrderMethods() Hangs when
Parallel Instance and dependsOnGroups
+ GITHUB-2400: BeforeClass/Method (and AfterClass/Method)
configuration methods that override default methods are
invoked multiple times
+ GITHUB-2396: @Ignore on method level doesn't work as expected
+ GITHUB-2382: TestNG version should be specified in MANIFEST.MF
+ GITHUB-2096: 7.0.0-beta6 memory issues (regression)
+ GITHUB-2355: TestNG creates multiple Guice Module Instances
+ GITHUB-2374: Add file name to the warning message
+ GITHUB-2321: -Dtestng.thread.affinity=true do not work when
running multiple instance of test in parallel
+ GITHUB-2363: JS error when switching theme
+ GITHUB-2361: No way to enforce @Test(singleThreaded = true)
when test defined in base class
+ GITHUB-2343: Injectors are not reused when they share the same
set of modules
+ GITHUB-2346: ITestResult attributes are null when retrieved by
Listener onTestStart if test fails at BeforeMethod
+ GITHUB-2357: TestNG 7.3.0 transitive dependencies
- Fetch sources using source service instead of a script
- Build with java source and target levels 8
- Modified patches:
* 0001-Avoid-accidental-javascript-in-javadoc.patch
* 0002-Replace-bundled-jquery-with-CDN-link.patch
+ Rediff to changed context
-------------------------------------------------------------------
Sun Mar 17 12:17:58 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of testng 6.14.3
- Generate and customize ant build.xml file

95
testng.spec Normal file
View File

@ -0,0 +1,95 @@
#
# spec file for package testng
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: testng
Version: 7.10.2
Release: 0
Summary: Java-based testing framework
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://testng.org/
Source0: %{name}-%{version}.tar.xz
Source1: https://repo1.maven.org/maven2/org/testng/testng/%{version}/testng-%{version}.pom
Source2: %{name}-build.xml
Patch0: 0001-Avoid-accidental-javascript-in-javadoc.patch
Patch1: 0002-Replace-bundled-jquery-with-CDN-link.patch
Patch2: 0003-Preserve-Java-8-compatibility.patch
BuildRequires: ant
BuildRequires: beust-jcommander
BuildRequires: fdupes
BuildRequires: google-guice
BuildRequires: javapackages-local >= 6
BuildRequires: jsr-305
BuildRequires: slf4j
BuildRequires: snakeyaml >= 2.0
BuildArch: noarch
%description
TestNG is a testing framework inspired from JUnit and NUnit but introducing
some new functionality, including flexible test configuration, and
distributed test running. It is designed to cover unit tests as well as
functional, end-to-end, integration, etc.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q
cp %{SOURCE1} pom.xml
cp %{SOURCE2} build.xml
cp -p testng-core/src/main/java/*.dtd.html testng-core/src/main/resources/
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%pom_remove_dep org.webjars:jquery
%build
mkdir -p lib
build-jar-repository -s lib beust-jcommander guice/google-guice jsr-305 slf4j/api snakeyaml
%{ant} jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a org.testng:testng::jdk15:
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc CHANGES.txt README.md
%license LICENSE.txt
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt
%changelog