Support TestNG class level annotations

オープン
#1,133 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
testing

調査の方向性

Issue にリンクされている TestNG のクラスレベルアノテーションのドキュメントから始め、Java の例を使って報告された "No tests in file" の動作を再現してください。既存の TestNG のテスト検出エントリポイントを特定し、クラスレベルの @Test を持つクラスから継承された public メソッドを対象に、private メソッドを除外するカバレッジを追加してください。テストが実行され、code lenses と Test panel に表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

ai-triaged bug enhancement low-priority test-discovery testng

Consider adding support for TestNG class level annotations.

https://testng.org/doc/documentation-main.html#class-level

With TestNG the @Test annotation can be placed on a class instead of the method. In this case all public void methods are considered tests even if they are not annotated.

Example:

@Test
public class TestNGTest {

  public void test1() {
    System.out.println("Test 1");
  }

  public void test2() {
      System.out.println("Test 2");
  }

  private void privateMethod() {
    System.out.println( "Not a test" );
  }
}

Currently there does not appear to be any way to run a test unless it is explicitly annotated. Right clicking and selecting Run just pops up an alert with No tests in file: .... No code lens appear at either class or method level. No tests appear under the class in the Test panel.

主要言語
TypeScript
スター
340
フォーク
173
平均マージ
1日 2時間
マージ済み PR(30日)
17

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-java-test のほかの issue

microsoft/vscode-java-test の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。