BIT 286: Web Applications Automated Web Testing
Selenium Selenium Is moving from being Firefox based to being more of a 'normal desktop' program that happens to script the browser for testing purposes We're going to stick with the old version To install this: You'll need the Firefox browser (about ½ way down, search for "Selenium IDE") 2
Installing Looking at the Selenium IDE panel List of test cases, recording top Let's record a simple test Verify that the title, h1 element have the expected values Run it 2 nd test Create new test Verify that clicking on button causes error message Run test suite 3 rd test Leave input blank & click on button causes different error message 3
Assert vs. verify Assert will stop the test if it fails Verify will keep going if the verification fails Can match text via glob or regex Selenium includes a debugger 4
Integrating This Into Your Project: How manage lots of tests You can save a Suite of tests (File Save Test Suite) This will want to save each test individually It doesn't seem to tell you what it's saving as it ask for file names :/ It does save them into.xhtml format (so you can check it into GitHub, etc) You can then open the suite later (File Open Test Suite…) If things got saved right it'll open up the test cases 5
Work For Today First, everyone install + play around with this a bit to get familiar with it Next, try creating a suite of tests + saving them (and also re-load them) Finally, go to the test plan we came up with last class & pick a couple of tests cases to implement 6