Creation – Day Two by Dima

Creation - day 2


A lot of time has passed since we talked about our first working version of the SalesForce tests, version 54. We don’t devote as much time as we would like for developing tests, but still the current version has gone a long way from version 54.

We did write about it one way or another in our blog, but now it is time to put some milestones in its’ way.

Here they are:

• all exceptions generated by the Selenium driver are handled. If an error is critical (no Selenium server, unable to login, element not found, unable to save a form even with a valid value), the test is terminated. In detail

• waitForListOfElements() function was added. Now it can be used instead of waitForPageToLoad(), when we need only a few elements, not the whole page. So when logging in to the SaleForce we don’t need to wait for the heavy flash to load, as soon as the username and password fields appear, we fill them. In detail

• test for one more object were added – AccountTest. For now it only checks the login page for obvious things like invalid username or password handling. Now we can see how TestNG is completing tests on the Selenium grid in parallel, saving our time. In detail

• implemented better log processing that allows to order events in a tree-like structure. It allows us to generate reports, which makes it easy to determine series of events preceding an error, and to examine each event in detail. Screenshots which were made directly before and after each event are available to view. In detail

• for making screenshots we use captureEntirePageScreenshotToString() and captureScreenshotToString() functions (depending on the browser). In detail

• added an option to generate report in any language with the help of ResourceBundle class.

• nearly all methods and properties have a javadoc comments. Documentation can be generated by launching javadoc.bat.

You can get the current version (362) from here.

In our previous posts you will find information on how to install the environment for running the tests, and how to launch the tests themselves.

Of course we are developing the SalesForce tests with ‘scientific’ goals – to investigate the common ways of creating tests and questions related to them. But two big parts of the tests – the wrapping class CommonActions for the Selenium driver and the ‘logging with hierarchy’ mechanism Events – both turned out to be useful and convenient by themselves.

After the convenient hierarchical log, where you don’t search for errors but the errors jump out at you, the other kinds of logs are very exasperating.
And CommonActions, besides logging and processing all driver actions it also handles and logs all exceptions.

So, we have looked back. Now it’s time to look forward.

Ahead, for a long period of time, we have seen some interesting things – Selenium 2.0 (link to page image taken from web archive), which will be integrated with WebDriver. We might have to touch it to see its’ features. How hard is it to change our tests to use WebDriver? Does it have a point? How much faster will the tests be completed? Limitations?

Very soon we will know the answers to these questions, and that means, you will know them to.
/a

Print this post | Home

Comments are closed.