Sorry to hijack this thread, but i am facing a similar issue related to multiple executions of the same Test suite.
I am new to selenium and created a basic test class parametrized to take in 2 parameters, along with a Test suite class which executes it having the @Suite.class annotation
I noticed that when i right click on the Test suite class and execute it runs 2 times (as expected).
Now, i ran the same at a project level doing a right click Run as Junit test at the PROJECT level and the test ran 4 times, I am baffled with this behavior
When we deploy a selenium project, we would be executing the framework from a PROJECT level right?
Keep in mind that JUnit/TestNg were primarily designed as Unit testing frameworks. In unit tests tests are meant to be independent with separeate setups and tear downs.
If you want to mess with ordering, you can do this via TestSuites.
But ideally, your tests should be completely independent of one another. For me, I use DB and API fixtures to quickly speed up setup by creating and tearing down all the accounts use for each test. This makes tests easily parallelizable if you want to run say 100 of them concurrently on the cloud.