How does a manual tester become expert in automation testing in Selenium? Please also explain where to start and how to start. I am also not good in Java but I have basic knowledge. I want to do selenium using Java
Alan Richardson has a great beginner book called Selenium Simplified.
A good solid way to learn with code examples is to use his Udemy courses and then follow up with Java for Testers.
Java isn't compiled with WebDriver, it's parsed. There's a fundamental difference between how you'll use it and how a Java developer will, but you're still using object oriented code the same way.
When you're confident enough, there's a free book on many .edu websites called Thinking in Java.
To become an expert test automator using selenium and java a manual tester should do the following,
- Learn java.
- Learn selenium. What it does? How it does it?
- Learn the limitations of selenium.
- Get hands on practice with selenium.
- Learn tips and tricks to use selenium effectively and efficiently.
- Learn how to customize selenium to make it more suitable for one's needs.
- Learn to understand what should be automated and what should be left to manual testing.
- Please never stop thinking.
And I'm sure there is much more to this list, which other experts will add here!...
Happy learning :)
- Set up a FirefoxDriver. It's the best supported driver and supports advanced features.
- Run the test to verify it's working. This is necessary for the next step. After every subsequent step (except committing) make sure all the tests still pass.
- Make the test as specific as possible, in this case by finding the element closest to the text you're looking for and verifying its contents. Ideally, the element should only contain the exact string you're looking for.
- Remove code duplication. Many developers skip this step, which usually ends up hiding the important logic in the tests in lots of inconsequential details. This makes tests harder to maintain, and global fixes more tedious to implement.
- Abstract away details and internals. Done right, this gives actual business value by making the code readable to people with limited programming experience.
- Commit to source control. With sensible commit messages you and other developers can learn from your mistakes and easily revert breaking changes when tests no longer run in the continuous integration system. When creating the test setup or doing heavy refactoring you might want to commit earlier in the process, but for pure test development this should be it.
Although learning programming and web-testing with Selenium from scratch as an autodidact is totally possible.
I think you should find a team that does both manual and automated web-testing. Try to gather more experienced colleagues around you and work with them.
If finding a team is impossible due to lack of actual real life experience I suggest you follow an online training, for example: http://courses.compendiumdev.co.uk/course/selenium-2-webdriver-with-java (Disclaimer: I do not have any relation or experience with this course, just something I found which looked OK and affordable)
The place to start is the Selenium IDE. This is a Firefox plugin that allows you to capture a sequence of interactions using the Firefox browser. Once you stop recording, you then store the recorded steps as a test case.
The Selenium IDE allows you to play back the test case that you recorded earlier. You will get a sequence of steps replaying in the log This will introduce you to some concepts of timing and state. You will find that you have to edit the Selenium test case to insert delays and wait for certain kinds of properties of the pages under test. For instance, when you click a button, you will need to wait for the new page to load and check that it loaded.
You will note that the Selenium IDE "programming language" is very limited, composed of just a series of command verbs and testing predicates. There is no looping, or any real conditionals. However, you can create some very useful tests with just this set of tools.
Selenium IDE allows you to organize your test cases into a test suite. This is a sequence of cases, each stored in its own file, that is referenced from the test suite file. You can then run the test suite file from the Selenium IDE.
With these steps mastered, you will have learned a number of important things about using Selenium: how to write tests that are repeatable, reliable and maintainable.
The next step is to use a plugin within Selenium IDE that will generate Java (or Ruby or Python or C#) code to invoke Selenium in several different test drivers. The resultant code can then be compiled and run under JUnit or TestNG and give you the same results as you got running under the Selenium plugin.
Now you have a base of working code that you can start to learn to modify, to add loops and conditionals and to begin the process of engineering your testing code to meet your other requirements. You can refactor parts into page testing patterns, link together tests, make your tests more sophisticated, all based on working, good code.
Great Answers, Adding few more pointers
- With basic coding knowledge and design basics we will be curious to know selenium specific approach for (iterating tables, uploading files)
Selenium tips you should sign-up to understand know-how using Selenium. Identify to-do items for (beginner, intermediate, advanced). Often I have observed learning is useful when it comes with on-job tasks. Find opportunities in your job where you can use selenium to automate your manual steps. Try simple cases before targeting large workflows
Find a mentor, Its difficult to find all answers through SQA or other portals. You may not receive positive reply from industry experts for all your questions
- There are lot of resources but consistent learning and reducing time for blockers becomes the key for quick learning. Keep learning it as a continuous task not just for your job related aspects
- Seleniumtests.com, Try coding simple examples and start preparing your own script repository, Download, execute, modify scripts. I recommend Selenium Simplified book.
- More Detailed Answer - Manual tester wanting to get into automation