DevOpsDownUnder – Day 2 – Flex your test
Tim Moore – Atlassian
What do we do wrong now?
- Continuous tests? , Against production environment?
- Current test make assumptions about enviroment (each to recreate DB etc)
- Sample app ( twitter clone (tooter) ), in java, maven to google apps)
- http://github.net/TimMoore/tooter , tooterapp.appspot.com
- Tests in “htmlunit” to perform tests again the actual website
- Logs in checks elements on page. Test from logging in, make sure simple errors on logging in are picked up and right error pages produced.
- First refactor was to generalise the tests to able to reuse things like “login to site as user XXX, password YYY”
- 2nd refactor puts everything in a seperate class. Low level things like login, host, html library all have their own class. Each to change
- Keep data in production database. Have test users or organisations to test against. Perhaps don’t confirm user signups so new users not created each test. Create “test groups” that test users are members of so changes only affect those test accounts, leverage A/B testing infrastructure
- Other tools include cucumber