Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use TestNG to create multi-user tests scenarios?
    primarykey
    data
    text
    <p>What I need to do is to create UI test cases for our application and we have decided to use Selenium with <strong>TestNG</strong> (we're still open to other options if there are considerable advantages).</p> <p>The tests we are trying to create are <strong>tests where several users interact with each other using the application</strong>. Basically we need to have several users logging in in parallel into our application and perform different actions. There is a relation between the actions of the users so they need to synchronize their interaction in some points (e.g a user needs to wait that a different user performs an action before he can perform his action). This means that there also needs to have some sort of shared information between the users (I was simply thinking about sharing an object that will take care of the synchronization points).</p> <p><strong>How should I structure my scenario where I need to describe the actions of different users that will run in parallel using TestNG?</strong> </p> <p>Is there a better framework for this or is there a pattern that addresses this problem? Any suggestios are welcome! Thank you. </p> <p><strong>EDIT:</strong><br> The best I could thing so far is to create a test where each <code>@Test</code> method has the actions of each user and then create a Suite where I define that the test methods should run in parallel. Example:</p> <pre><code>public class MultiUserTest { @Test public void user1Interaction() { User user1 = new User(); // user1 performs actions } @Test public void user2Interaction() { User user2 = new User(); // user2 performs actions } } </code></pre> <p>Then create a Test Suite where I specify that the methods of <code>MultiUserTest</code> should run in parallel. </p> <p>However I don't really like this solution. I don't like the fact that I'm relying on an XML configuration (Test Suite) to describe the correct behavior of my test (which will not be obvious just by looking at the java code). I also don't like the fact that I will not be able to simply run the test by using the TestNG plugin on eclipse by doing "Run As - TestNG Test". Again, any suggestion is very welcome. Thank you!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload