I want to know what exact software should I install before I run my automation project. Selenium web driver, selenium java, testNG, junit was installed but there are some problems with that also. 1. Selenium java file doesn't have more JAR files like people shows in their video tutorials. 2. When I' going to run my project as testNG, eclipse said windows firewall has blocked some features of this app.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Because your main method have been put under beforeclass annotation. The main method does not take any annotation. If you provide any TestNG annotation to the main method then this error is thrown. When using TestNG you don't write a main method. It is not that main method along with other tests with @test annotation will not run, it is just that the main method does not take any annotation. It is only the non-main methods that take TestNG annotations. If you have a regular java main method and the other @test methods in the same class, the program will compile and run successfully but the main method will be ignored and won't run at all. It is only the other @test methods that will run.
This error message...
...implies that TestNG didn't find any
@Test
to execute.Your main issue is though you have imported
Test
as:But your code block has no
@Test
as such but includes a@BeforeClass
. As there are no tests, TestNG doesn't find any Test to execute.Solution
The easiest solution would be to change the
@BeforeTest
annotation with@Test
and execute you Test case / Test Suite.