Started to use Selenium but still dont know what I am doing

(Muz Raj) #1

Hello Everyone

I’ve been testing for a number a years now and started to use Selenium but, the problem I have is understanding how it works and some basic concept of of it. And trying to implement this in my next QA automation role. I did create a test framework but only with the help of going to a class to put all this together.
If I was testing a website that had a login feature, my understanding is to test most of those features within there such inputting username and password, another test case to see if can go through another route to reset my password and another to see if it can accept the same login but with an incorrect password.

This my concept so far but let me know what everyone thinks and what I should be doing.

(Livius L) #2

Selenium isn’t so intuitive.
You should try Endtest.

(Faith Roberts) #3

Based on what you have said, I believe you have covered most of it.

I would also test what would happen if the user does not exist. Also, a password lockout, providing you have one.

Are you planning on using Selenium webdriver or Selenium IDE?

The IDE is more intuitive in the sense that it does “most of the work”. What I mean is, you don’t need to code the whole thing yourself like you will with webdriver.

Also, are you using Python or Java, if you are using webdriver?

(Muz Raj) #4

Thanks for the suggestion, I look into that as well.

(Muz Raj) #5

Thats actually a good test case, thanks for the suggestion.
I am planning on using Selenium webdriver and I am using Java.

(Faith Roberts) #6

Java is the most popular choice and you won’t have issues finding resources online to help you. There are also people in this club that use Java that will be able to help you with issues on a code-level.

(Mark Winteringham) #7

Hi @mazza

I think what you’ve captured is a common issue that testers who move into automation face. What to automate and what not to.

Automated regression testing is about using automated tests to tell us about changes in the application. I.E. if a test fails it means something has changed and then we, as a team, have to explore the change to determine if it is acceptable or not.

So first of all ignore the tools and focus on what areas of the application matter to you the most if they were to change. Spend time understanding how your application works, the technologies it’s made up of and how they connect to one another. Then think about the risks that could affect those parts of the application and how you might test them.

For example with a login feature it may have a UI made up of HTML, CSS and JavaScript that communicates with a Java/C#/Ruby backend that connects to a database. Each technology makes up the flow of the login process and has specific risks that could prevent login being successful. There could be risks in the JavaScript not triggering the login request, the Web server might not check credentials correctly, or the DB might be down. I would identify those risks, determine which matter to me the most and then build automated tests for them.

Then I bring tools back into the mix. Once I know what I want to test, I can begin to automate and choose the right tools for the job. For example if the risk is in a JavaScript function in the UI, I could use Selenium to trigger to the function in the UI and check the output because the risk is in the frontend. If the risk is around saving data in a database I could use an API test tool because the risk exists in the backend.

Automation strategies require strong analytical skills and conversations with your team to help you understand your application. But once you know what you want to test and where, the tooling and implementation become a lot easier.


(Daniel Felix) #8

can you chose random items from a page , using Endtest ? Ex. click on a random category.

(Livius L) #9

I believe you can do that.
You can even add an ‘Execute JavaScript’ step if you want some extra flexibility.

(Gerard) #10

I totally second that! Nicely put.

Following on from your risk analysis, if you do choose to automate via the UI, then my 2 cents worth is that Selenium is a great tool but it requires you to do more ‘plumbing’ in whichever langauage (C#, Java, Python or other). As you may already be aware, the more plumbing, the more code … the more code, the more potential maintenance. To avoid a maintenance nightmare going forward, I would suggest using automation design patterns and refactoring your test cases. Also, automation code reviews can help.

Folks mentioned Endtest. In addition to it, one other option you could look at which would have less ‘plumbing’ is Test Complete.

As you’re probably geting a sense for in the answers, there is no one correct answer unfortunately. Therefore, if someone was struggling to determine what tool to use, they may wish to use several and do a small proof of concept in each, or even bring in an external consultant to advise or create some POC stuff.

Quick final point … you may have found this already, but in case not, there’s a great series of MOT articles on automation here:

(Muz Raj) #11

Thank you everyone for your answers and taking the time for helping me understand Automation a bit better. Its all been very informative.

(Faith Roberts) #12

I have been doing automated testing for a short while now and this is probably the most informative thing I have read on the subject. Thank you for sharing this but I do have to rethink what I was doing before!