I want to know about the actual automation process in a real time project. I want to apply selenium webdriver automation in my project. I am new in the testing field and have the basic knowledge of selenium webdriver. but i am confused how to apply it in a real time project. I am the only tester in my company. Nobody knows about testing. Can anyone explain how should I first start my selenium webdriver project.
An easy way to get started is to pick old and stable features of your project to automate first. Consider the critical paths that users will travel most often. Automate broadly at first, only narrowing down to less common and more specific variations of your workflows afterwards. Keep your test cases small and focused where you're able to. Isolating tests to specific features or aspects of a feature is a good way to reduce the occurrence of peripheral factors being the cause of failures.
If you're not familiar with a programming language that has Selenium bindings, I'd first learn the basic fundamentals of whichever language you choose. Common choices are Java, Ruby, or Python. Consider how your organization wants selenium to exist in relation to the app it tests. There could be reasons to match the technology they're using, or not.
Every single app out there on the net behaves differently, so automating a new project always starts off more challenging as you learn the specific behaviors and traits your project has. The bigger and more complicated your tests are, as in the more it checks and touches, the more you'll have to consider and develop solutions to deal with the nuances of your project.
One concept you can look into as a way to design your tests and the code that drives the browser is the Page Object Model (POM). This model encourages writing re-usable code, and when done well, you end up with very modular pieces that many tests can re-use in whatever order they require.
There are two broad phases: Writing the tests & Scheduling the tests
Writing the tests
This means writing the actual test code in the language that you select so that you can run them. The tests also get shared with other developers who can run the tests locally while they are making changes to ensure they don't break anything. The tests can also be used against a staging server set up specifically for that purpose. High level tests ('smoke tests') can also be run against production if appropriate for the organization. Be sure to use a Page Object approach for readable tests.
Scheduling the tests
As soon as you have tests written you'll want to consider how to bake these into your software development process which usually means considering:
- A version control system such as git
- A server to store and share code, e.g. github
- A Continuous Integration system such as Jenkins / CircleCI with remote servers to run the code
- A deployment process for managing change