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

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.

Selenium isnā€™t so intuitive.
You should try Endtest.

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?

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

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

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.

Thanks,
Mark

9 Likes

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

I believe you can do that.
You can even add an ā€˜Execute JavaScriptā€™ step if you want some extra flexibility.

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: https://club.ministryoftesting.com/c/30-days-of-testing/30-days-of-automation-in-testing

4 Likes

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

1 Like

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!

1 Like

Iā€™ve started with test automation fairly recently, using C# and Selenium, for me improving my understanding of object orient programming helped me a lot in understanding how our in-house automation framework operates.

1 Like

Hello,

if you are planning to use selenium automation tool with python programming language then I would love to help youā€¦

Please consider the below article, which explain the complete details of automation testing with seleniumā€¦
Please have a look: Selenium Automation Testing Using Python

I hope it will be helpful to youā€¦
All the best

3 Likes

The wrong password scenario is a data variant of the correct login.
You basically donā€™t need to write a brand new scenario for this case; you can simply stub out a 401 response for any login data and check how your UI reacts.

2 Likes