25 Feb 2011
So, I finally got my head around maven-release-plugin maven plugin. And, yes, it’s awesome.
I have not tried any kind of different/difficult scenarios yet, just plain basic ones.
21 Feb 2011
You probably are familiar with one of the most popular web UI testing tool - Selenium and it’s most famous tool Selenium IDE.
I don't want to read all this, give me the code
You could find all the code you need on github.
Sorry for not embedding all the code in the article. That way the article becomes clumsy unreadable monster. If anyone could recommend me some collapsable/expandable solution - I would appreciate it a lot.
Why do I need to bother with yet-another-testing-tool?
The main advantages or features of the tools are (imo):
How could I automate that?
Selenium has child project - Selenium Remote Control which could be used.
Quote and image from Selenium Remote Control site:
- real UI behavior testing - tests are run inside the real browser and will fire/use real end-user key, mouse, etc events
- ability to export the test in whole bunch of programming languages (java, python, ruby etc ...)
- ability to run tests on multiple target web-drivers (firefox, internet explorer, etc ..)
- Selenium IDE (mentioned earlier) is really nice tool which allows to create simple tests cases very fast, in few minutes or even seconds, literally
- basically the only way to automate difficult Ajax/RIA component testing on different target environments; other httpUnit like approaches are not good enough
Selenium RC comes in two parts.
- A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
- Client libraries for your favorite computer language.
Lucky to us, selenium has maven artifacts available to be used to plug-in into Atlassian PDK build procedure.
- make this optional (enabled by default) option
- selenium-rc server side should be forked before integration tests will be executed
- selenium-rc client side tests should be executed as part of the integration test suite
- selenium-rc should be revoked upon integration-test completion
To get pom.xml file snippet - see this pom.xml gist
How to check:
- is achieved by default maven profile (activated by !property)
- is achieved by maven - specifying selenium-rc start-server goal to be run on pre-integration-test phase
- to achieve this please refer to Atlassian article - Writing Integration Tests. Basically that means - you should put your code inside src/test/java/it/ folder and specifying proper locatest.properties file.
- is achieved by maven - specifying that selenium-rc stop-server goal should be executed on post-integration-test phase.
command from the project home folder.
21 Feb 2011
Check out this SlideShare Presentation: