Title: Open Source in Automated Testing.
By using Open Source Projects as the foundation of our internal Test Framework, it is possible to avoid vendor tool lock-in. Since the same language is spoken as the testing teams and by better understand their problems, as well as being closer to them, it is posisble to deliver more value. This talk is all about how to built a Framework that helps teams create whole automated test suits in a simple and easy way.
2. Opensource in automated testing
Who am I?
●
Former Linux kernel developer and sysadmin
●
Now doing automated software testing
●
Maker, breaker, fixer, geek and everything in between
3. This presentation is about my work at
Instituto de Informática, I.P.
Some views are my own
Opensource in automated testing
4. Question, are you doing...
●
automated tests?
●
manual tests?
●
tests, what tests?
Opensource in automated testing
5. What the heck are automated tests anyway?
Opensource in automated testing
6. Automated tests are:
●
code (and human readable scripts)
●
a software project for testing business code
●
tests you don’t do manually
They avoid human mistakes & improve reliability
Opensource in automated testing
7. No code is really complete without tests
More (working) tests means more code coverage
Yes, regression testing is a thing
Opensource in automated testing
8. In 2018 we had 1958 software releases to test.
This means, on average, eight (8) releases per
working day
Test automation is a must
Opensource in automated testing
9. Our choices for automated tests were:
●
buy a licence/subscription for a vendor tool
●
build our own
●
none of the above
Opensource in automated testing
10. We could have spent taxpayers’ money on:
●
buy a licence/subscription for a vendor tool
(and be tied to it for eternity)
Opensource in automated testing
11. But instead we chose:
●
build our own
(and promise to fix all bugs forever)
Opensource in automated testing
12. These are the main
open source projects
we are currently using
Opensource in automated testing
19. Tests are part of the Project source tree
Build pipeline compiles business and test code
Build becomes unstable if test fails
Opensource in automated testing
21. It all starts with a Cucumber script
Given a certain precondition
When an action is made
Then results are verified
And a report is generated
Opensource in automated testing
22. Real world example:
@opensourcelisbon @logintest @smoke @availability
Cenário: Validar o login da aplicação
Dado que os sistemas estão disponíveis
Quando efectuamos o acesso com um utilizador interno
Então obtemos acesso aos sistemas
Opensource in automated testing
23. @Dado("^que os sistemas estão disponíveis$")
public void que_os_sistemas_estao_disponiveis() {
Navigate.to(SERVER_URL, LOGOUT_PAGE);
}
@Quando("^efectuamos o acesso com um utilizador interno$")
public void efectuamos_o_acesso_com_um_utilizador_interno() {
Navigate.withLogin(USERNAME, PASSWORD, SERVER_URL, LOGIN_PAGE);
Screenshot.take();
}
@Então("^obtemos acesso aos sistemas$")
public void obtemos_acesso_aos_sistemas() {
FindElements.byCssSelector(LOGIN_MSG);
}
Opensource in automated testing
25. Conclusion
You CAN create a framework like we did
Be prepared to work on it permanently
Listen to feedback for further improvement
Contribute your work upstream (when possible)
Opensource in automated testing