Testing Forms
Automating the testing of forms helps speed up the test process and saves having to do the repetitive work of filling the form with test data.We use Selenium IDE for our form testing because it is simple to use and is integrated into Firefox.
Selenium IDE |
Test Suite
With the redesign of our enhanced listing signup form we needed to rewrite our selenium test suite for testing the signup form.Using selenium IDE we can record our actions in the browser and replay them so we can step through every test and check the form works as expected.
If you have used unit testing before selenium and its concepts will be familiar to you, with selenium the tester can assert things such as checking for error strings in the form when the form has been submitted or asserting a page has the desired title or heading.
We first start by testing the form to make sure that our error checking is working we like to test all the required fields in a form and stepping through each required for field and asserting the error string is present in the form.
Then we move through the form testing any other constraints such as passwords not matching and finally check the form with correct data to verify it works correctly.
Recording your browser is as simple as clicking the record button in the UI and then carry on as usual, you can also access rules and statements by right click your mouse or adding them directly from the IDE GUI.
Conclusion
When you need to test a form using selenium to drive it makes sense and it saves time and effort when rerunning any tests. We like to use test driven development to help improve the standard of our code base.Very soon we will be moving The Care Homes Directory over to using a pure div layout for the whole website in an attempt to improve keyboard navigation of our website for improved accessibility for non mouse using visitors.
And releasing a new improved enhanced listings sign up form and Google wallet payment support which greatly improves the users experience.
Also we are adding aria data to our website and are improving our
<nav>
structure so we can improve our breadcrumbs.
No comments:
Post a Comment