Testing web front ends is a pain, partly because we end up testing the back end with them. Selenium helps by automating the input, but the selenium driver code lacks high-level interfaces for things like "find_and_click" or "find_and_key". Adding these with a wrapper makes data-driven selenium testing via Object::Exercise easy.
08448380779 Call Girls In Civil Lines Women Seeking Men
Selenium Sandwich Part 1: Data driven Selenium
1. Selenium Sandwich Part 1:
Automating Selenium Sequences
Steven Lembark
Workhorse Computing
lembark@wrkhors.com
2. Testing web front ends is different
Much of the testing is manual.
Tests validate multiple systems at once.
Often cannot test without a running back end.
Here is the first installment of a better way.
3. Been there?
Hey where did that come from? Check the
logs...
Can't use that database: dropped it last
week...
Server isn't using your version any more...
4. Q: Why is it this bad?
A: Because you aren't testing the front end.
5. Q: Why is it this bad?
A: Because you aren't testing the front end.
Q: Where do you get the content for testing?
6. Q: Why is it this bad?
A: Because you aren't testing the front end.
Q: Where do you get the content for testing?
A: The back end.
7. Q: Why is it this bad?
A: Because you aren't testing the front end.
Q: Where do you get the content for testing?
A: The back end.
You are testing both ends at once.
8. Q: Why is it this bad?
A: Because you aren't testing the front end.
Q: Where do you get the content for testing?
A: The back end.
You are testing both ends at once.
That makes front ends different.
9. Testing just the front end
Isolation and repeatiblity are key to testing.
Selenium helps with repeatability.
Catch: Hardwired code required for each test.
13. False Lazyness
Calls to “find_element” use the element.
Hardwiring multiple calls is extra work.
Why not “find_and_click”, “find_and_type”?
A: Selenium interface doesn't declare them.
Q: Why can't we do better than the interface?
28. So ends our first episode...
Developing wrapper classes in Perl is trivial.
Repeatable test metadata is simple enough:
Use high-level calls with Selenium.
Coming up next: Isolating the front end.
29. =head1 SEE ALSO
Good general talk on Selenium.
Introduces the Selenium Playground on
github:
<http://www.slidesearchengine.com/slide/
testing-your-website-with-selenium-perl>
30. =head1 SEE ALSO
Overview of Object::Exercise
<http://www.slideshare.net/lembark/object-
exercise?qid=6ed2ecf1-2520-4d4a-b6fa-
545b95693ebc&v=qf1&b=&from_search=1>
Current documentation:
<http://search.cpan.org/~lembark/Object-
Exercise-3.02/lib/Object/Exercise.pm>