Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在Intellij中调试TestNG时需要运行@BeforeSuite_Java_Intellij Idea_Testng - Fatal编程技术网

Java 在Intellij中调试TestNG时需要运行@BeforeSuite

Java 在Intellij中调试TestNG时需要运行@BeforeSuite,java,intellij-idea,testng,Java,Intellij Idea,Testng,我正在尝试调试IntelliJ中的TestNG测试,它是测试自动化套件的一部分。但是,在运行此测试之前,我需要运行标记为@BeforeSuite的方法中包含的代码 调试测试时,如何配置IntelliJ以自动运行@BeforeSuite中的代码?如果标记为@BeforeSuite的方法在同一类中,则它将在@test方法之前自动运行。您只需将调试点保留在@BeforeSuite方法中。解决方法: 我发现我可以指定调试组中的所有测试。我可以用一组调试代码标记@BeforeSuite类和测试中的方法 然

我正在尝试调试IntelliJ中的TestNG测试,它是测试自动化套件的一部分。但是,在运行此测试之前,我需要运行标记为@BeforeSuite的方法中包含的代码


调试测试时,如何配置IntelliJ以自动运行@BeforeSuite中的代码?

如果标记为@BeforeSuite的方法在同一类中,则它将在@test方法之前自动运行。您只需将调试点保留在@BeforeSuite方法中。

解决方法:

我发现我可以指定调试组中的所有测试。我可以用一组调试代码标记@BeforeSuite类和测试中的方法

然后在Intellij运行配置中,我告诉它运行调试组