parallel=class with static nested classes: Running testng.xml file works. Running class/package causes incorrect ordering
まだ誰も着手していません。
評価
調査の方向性
Reproduce with the linked testng_parallel_bug_issue_20240503 project, then compare the Eclipse class/package launch path with the testng.xml path. The issue says an ITestNGListener sets parallel=classes on the suite, but class/package launches behave like parallel=methods. Read how the plugin builds the suite for class/package selections versus an XML file, and inspect where nested static classes are collected and ordered. Done means class and package launches honor parallel=classes with the nested class, matching testng.xml behavior.
索引モデルが issue の本文から書いたものです。
説明
Problem Statement
See prior report at https://groups.google.com/g/testng-users/c/KpPqUAzEVSw
A test project illustrating the problem is at https://github.com/RichMacDonald/testng_parallel_bug_issue_20240503
Using testing 7.10.2. Eclipse plugin version is 7.10.0.202404131040
I have a test class that includes a subclass of itself as a static inner class. So two classes in the same file, one class inheriting from the other.
I run all my tests with 'parallel=classes'. This is specified by an org.testng.ITestNGListener implementation that manually sets the property on the ISuite.
In Eclipse, when I select the class itself and launch testng, there is a single thread that calls @BeforeClass on BOTH classes before calling @BeforeMethod. In other words, the mode is running as 'parallel=methods'. I have verified that the ITestNGListener has been called first. This is the issue.
If I select the package itself and launch testng, the outcome is the same error.
If I select the project's textng.xml file, then it works correctly. With a single thread, all the methods in the first class are executed before the second class is begun.
If I move the static inner class to its own separate file, then everyone works correctly in all modes. Specifically, running testng on all classes in a package now works correctly. whereas it didn't before.
Any relate message in "Error Log" view
"Windows -> Show View -> Others -> Error Log"
None
The Dependency Management tool for your project
- Maven
- Gradle
- Ant
- Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)
Operating System
- Windows
- Linux
- OSX
- 主要言語
- Java
- スター
- 198
- フォーク
- 163
- 平均マージ
- 4分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testng-team/testng-eclipse のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
testng-team/testng-eclipse#189 · コメント 1 件 ·
-
難易度 3/5 半日 初心者へのやさしさ 62/100
testng-team/testng-eclipse#590 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
testng-team/testng-eclipse#589 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
testng-team/testng-eclipse#578 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
testng-team/testng-eclipse#565 · コメント 1 件 ·
testng-team/testng-eclipse の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testng-team/testng#3672 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eclipse-edc/IdentityHub#1296 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
cloudfoundry/uaa#4194 ·
メンテナーはふだん 1 日以内に返信
-
area: ui priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
tetsuji16/microProject#1721 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信