[QA] pair programming with Zeljko
Baochuan Lu
lubaochuan at gmail.com
Wed Nov 26 15:59:38 UTC 2014
Hello everyone:
I had a pairing session with Zeljko at 6am CDT 11/25/14 for about an hour.
We finished the test we started last time. The test checks the presence of
the view history link on any page. This time we added two step definitions
in the view_history_steps.rb file for visiting a random page and checking
the presence of the view history link. Our step definitions drives the
browser using a RandomPage page object, which we defined in the
random_page.rb file and added to the support files of the browser test
project. The new page object class inherits from the PageOject class, which
is easier to use because it hides the details (webdriver code). I need to
learn more about how page objects work.
Through this session I experienced the lifecycle of writing browser tests
using cucumber. We identified a feature we need to test, defined the
feature in a feature file, and let cucumber to drive the rest: run cucumber
to get error messages, implement/fix one thing according to the errors, and
repeat.
I also learned that once we pass a test it is always good idea to negate
the test to see it fail, which ensures that our test is actually working
(not always passing regardless). For example, if a test expects the
presence of a view history link, by negating the test to expect that the
link is not present should cause the passing test to fail.
As always I learned a great deal this time and look forward to our next
session.
Thanks,
Baochuan Lu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20141126/1eedb216/attachment.html>
More information about the QA
mailing list