Questions about automation testing using Testcomplete

177 Views Asked by At

I'm working on a project regarding website test automation and I hope someone can help me with this question?

How would you recommend setting up some automated test processes that would not constantly need to be updated to test each of the core flows to test the following for a website:

  • login
  • register
  • sign in with facebook
  • save an item
  • delete an item
  • test that the few key pages (both logged in and logged out) are working like

Thanks in advance.

2

There are 2 best solutions below

0
On

I'm not sure if I understand well. But here is an instance of project setup. Split your KeywordTest section into two folders:

  • A Test folder: it should contain all the KeywordTests that are called when you run your testsuite. Each of those KeywordTests should test a specific feature (Verify_Login_Fail, Verify_Login_Success...)

  • A Library folder: it should contain all your KeywordTests that are reusable and that might be used often from your Test folder KeywordTests. It's a kind of function library. It avoids code repetition and is easier to maintain. For instance, you can create a KeywordTest that takes as parameter a Login and Password and that proceeds with the actions on your website to log a user in.

Store the sensible data (that might change often) in file or a database rather than hardcode it. For instance a file Login.csv where you store all the combination of login and password you want to test.

0
On

You have to write all the steps into in a class which should be in your library package and then you have to call all the methods from your test class of test package. You should use testng in your test class then create a testsuit of test class and run the script.