Need some ideas for writing automated tests

I am writing some unit tests in VS 2010 using Selenium and C #. I have some test cases. For example, some of my test cases:

  • Launch the website: http: // localhost: 8080 . Check for the badge. Enter your username and password and log in.

  • Check if the Search tab is present. Click the Search tab. Check the Book Search, Image Search, and Internet Search tabs.

  • Click Book Search. Enter "C-Sharp for Dummies." Click Search. Be sure to return the appropriate results.

Now, my question is: is it better to create separate classes for each of the above test cases or is it better to combine them with one class and just have separate methods?

All three test cases are related to each other. By this I mean that execution # 2 requires the first to be first, and # 3 first requires # 2. If I create separate classes, I believe that I will need to call the method in # 1 in class # 2 and call the methods at # 1 and # 2 in class # 3.

I am not sure what would be a good idea for this. Thanks in advance.

+5
source share
2 answers

- NUnit , 1 SetUp, , ( ) , - . , , .

2 3, - .

( " " ), 3 2, , , 2 , 3 .

2 , , 3 , 2 , 3 , . , , 3 2.

, " " " ", 2 . 3.

" " " ", 2. 3 2, , 3. , " " 2.

+1

, , , , , . , .

WatiN Selenium.

+1

All Articles