Skip to content

Posts tagged ‘release’

31
Dec

Thucydides Release 0.9.229


There have been many releases since the last release notes were published, so this entry will summarize some of the highlights that are included in release 0.9.229 (though many came out in releases previous to that). Some of the highlights include:

  • Added support for Selenium 2.39.0
  • Testing AngularJS is made easier with support for the ng-model attribute in the Thucydides @FindBy annotation. Suppose you have this AngularJS input field:
<input ng-model="angularField" value="Model value" />

You can now find this directly using the Thucydides @FindBy:

import net.thucydides.core.annotations.findby.FindBy
 @FindBy(ngModel = "angularField")
 public WebElementFacade ngModelField;
  • Support for nested page objects – you can have page object fields inside other page objects. This makes it easier to write page objects for smaller reusable sections of the screen.
  • You don’t need to override the constructors for ScenarioSteps and PageObjects any more
  • You can provide your own webdriver instance using the ‘webdriver.provided.type’. Just implement the DriverSource interface. For example, you could implement a class like this:
package com.acme
public class MyFunkyDriverSourceImpl implements DriverSource {
    public WebDriver newDriver() {
       return new FunkyWebDriver();
    }
}

Then just run the tests with the following properties (e.g. in the thucyiddes.properties file or on the command line):

webdriver.driver = provided
 webdriver.provided.type = funky
 webdriver.provided.funky = com.acme.MyFunkyDriverSourceImpl
  • Lots of improvements to the reports, including:
    • Reports now have the option to hide the pie chart on the aggregate pages
    • Test reports now display the date and time of the report generation on each page.
    • You can use the ‘show.related.tags’ system property to display (default) or hide related tag statistics on the dashboard
    • Support for reporting on releases/versions by integrating with JIRA (there will be a full article on this feature shortly)
    • Support for integration with 3rd party test management software such as the JIRA Zephyr plugin to report on manual as well as automated tests
  • Many bug fixes

If you are still on an older version, update your dependencies today!

19
May

Thucydides Release 0.9.125


We made several minor releases in the last two months.  The latest release version is 0.9.125 which is now available for download. Here is a list of some of the key features and bug fixes added recently.

More flexible Examples tables for data-driven tests on the details page

Examples table now supports pagination, sorting of columns and text search.

Examples table with pagination, sorting and text search

Examples table with pagination, sorting and text search

Better handling of foreign characters in reports

Reports now display non-English characters properly.

Before

Before

After

After

Test results can be downloaded

The main report page now has a link to download test results in CSV format.

Test results can be downloaded in CSV format

Test results can be downloaded in CSV format

Fluent field entry using into a WebElementFacade

A new method has been added to provide a more fluid way to enter data in a web element facade. The following code snippet will explain.


...

page.enter("some value").into(facade);

...

Support for GivenStories in jBehave stories

jBehave style GivenStories keyword can now be used in .story files. GivenStories is used to specify pre-requisites for a story in jBehave. This is a very useful feature of jBehave that helps organize the stories better and reduces duplication. See here for examples.

Filter tests by tag in jUnit

You can now filter tests by tag while running Thucydides. This can be achieved by providing a single tag or a comma separated list of tags from command line. If provided, only classes and/or methods with tags in this list will be executed.

Example:

mvn verify -Dtags="iteration:I1"

or

mvn verify -Dtags="color:red,flavor:strawberry"

Support for jUnit Assumptions

If steps include junit style assumptions, then those steps where the conditions under assumptions fail are marked as PENDING instead of ERROR. Subsequent steps are also marked as PENDING.

Bug Fixes

  • Thucydides-146: Fixed a bug that caused chromedriver to fail with error message “Error communicating with the remote browser. It may have died” when @Managed(uniqueSession) was set to true.
  • Thucydides-149: Fixed a bug due to which test where no steps were executed due to error was reported as pending in the aggregate report.
  • Thucydides-150: Tests where no steps ae executed due to errors now show relevant exception cause in the report. Earlier the test was reported as error but no details were provided.
  • Thucydides-152 : XML reports now support UTF-8 encoding.
  • Thucydides-155: Fixed a bug that prevented webdriver from correctly restarting for parameterized tests even when thucydides.restart.browser.frequency property is set to 1
  • Thucydides-158 : Fixed a bug that was causing reports to throw errors for data-driven tests when @TestData contained an array.
9
Mar

Thucydides Release 0.9.103 – Improved reporting, other enhancements and bug fixes


Thucydides Release 0.9.103 adds some useful new features and enhancements.

Reports distinguish between errors and failures

Test reports now distinguish between test errors and failures. The following screenshot will make this clear.

Reports distinguish between Test Errors and Failures

Reports distinguish between Test Errors and Failures

Detailed report will not show screenshots column if there are no screenshots in the test

Tests that do not have any screenshots will no longer show an empty screenshots column in the details page.

no-screenshots-column

Injecting WebElementFacades in Page objects

Instead of declaring WebElement variables in Page Objects and then calling element() or $() to wrap them in WebElementFacades, you can now declare WebElementFacade variables directly inside the Page Objects. This will make the Page Object code simpler more readable.

So, instead of writing


@DefaultUrl("http://en.wiktionary.org/wiki/Wiktionary:Main_Page")
public class DictionaryPage extends PageObject {

    @FindBy(name="search")
    private WebElement searchTerms;

    private WebElement go;    //variable name matches element id or name

    public DictionaryPage(WebDriver driver) {
        super(driver);
    }

    public void enter_keywords(String keyword) {
        element(searchTerms).type(keyword);
    }

    public void lookup_terms() {
        element(go).click();
    }

    public List getDefinitions() {
        WebElement definitionList = getDriver().findElement(By.tagName("ol"));
        List<WebElement> results = definitionList.findElements(By.tagName("li"));
        return convert(results, toStrings());
    }

    private Converter<WebElement, String> toStrings() {
        return new Converter<WebElement, String>() {
            public String convert(WebElement from) {
                return from.getText();
            }
        };
    }
}

you can write

@DefaultUrl("http://en.wiktionary.org/wiki/Wiktionary:Main_Page")
public class DictionaryPage extends PageObject {

    @FindBy(name="search")
    private WebElementFacade searchTerms;

    private WebElementFacade go;       //variable name matches element id or name

    public DictionaryPage(WebDriver driver) {
        super(driver);
    }

    public void enter_keywords(String keyword) {
        searchTerms.type(keyword);  //directly use facade
    }

    public void lookup_terms() {
        go.click();                //directly use facade
    }

    public List getDefinitions() {
        WebElement definitionList = getDriver().findElement(By.tagName("ol"));
        List<WebElement> results = definitionList.findElements(By.tagName("li"));
        return convert(results, toStrings());
    }

    private Converter<WebElement, String> toStrings() {
        return new Converter WebElement, String>() {
            public String convert(WebElement from) {
                return from.getText();
            }
        };
    }
}

Switching to another page object

A new method, switchToPage() has been added to PageObject class to make it convenient to return a new PageObject after navigation from within a method of a PageObject class. For example,

@DefaultUrl("http://mail.acme.com/login.html")
public class EmailLoginPage extends PageObject {

    ...
    public void forgotPassword() {
        ...
        forgotPassword.click();
        ForgotPasswordPage forgotPasswordPage = this.switchToPage(ForgotPasswordPage.class);
        forgotPasswordPage.open();
        ...
    }
    ...
}

Other minor enhancements and bug fixes

  • Selenium version updated to 2.31.0.
  • Added containsOnlyText and shouldContainOnlyText methods to WebElementFacade. These methods are similar to containsText/shouldContainText methods but check for exact match.
  • Modified shouldContainText method in WebElementFacade so that error message shows both the expected text, and the text found in the element.
  • Fixed a bug in the error message of the method WebElementFacade.shouldNotContainText.
  • Now you can both activate and deactivate native events for Firefox by setting the thucydides.native.events property to true or false.
  • Thucydides-141: Fixed a bug due to which when trying to open a page with slash in the end of url, browser tried to open page without slash.
29
Jan

Thucydides Release 0.9.94 – More improvements to reports and some bug fixes


We released version 0.9.94 of Thucydides over the weekend.

Improved reports home page

Reports home page now shows two pie charts, one with the overall tests count and another with the test count weighted by number of steps.

Screen Shot 2013-01-30 at 6.27.24 AM

 

 

 

Screen Shot 2013-01-30 at 6.27.33 AM

 

 

The first pie chart gives an overall status of the tests as it shows how many tests have passed, failed or are still pending. The second pie-chart gives the test status weighted by number of steps which could be used to deduce the nature/criticality of test failures.

There are also some minor improvements to the requirements reporting page.

Updated Selenium version to 2.29.0

Selenium version has been updated to 2.29.0 (Selenium Release notes)

Minor enhancements and bug Fixes

  • #Thucydides-122: Added thucydides.verbose.steps property, that provides more detailed logging of WebElementFacade steps.
  • #Thucydides-125: Fixed a bug that caused reports to fail for parameterized tests with new line characters in the test data.
  • #Thucydides-130: Fixed a bug due to which PageObject.upload was not working for files on classpath.
17
Jan

Thucydides Release 0.9.92 – Improved Requirements reporting, screenshot blurring and bug fixes


Release 0.9.92 is now available and contains the following enhancements:

Improved requirements reporting

The Requirements reporting tab has been enhanced to show test results at a requirements level. This provides an overall view of the progress of the project by making it easier to view not only what stories have been implemented, but also features and capabilities that remain to be done. Here’s a screenshot.

Requirements Reporting tab

Requirements Reporting tab

You can read more about Thucydides’ approach to requirements reporting in this excellent blog post – Functional Test Coverage – Taking BDD Reporting To The Next Level

Blurring screenshots (Thucydides-116)

For security/privacy reasons, it may be required to blur sensitive screenshots in Thucydides reports. This is now possible by annotating the test methods or steps with the annotation @BlurScreenshots. When defined on a test, all screenshots for that test will be blurred. When defined on a step, only the screenshot for that step will be blurred. @BlurredScreenshot takes a string parameter with values LIGHT, MEDIUM or HEAVY to indicate the amount of blurring. For example,

 @Test
 @BlurScreenshots("HEAVY")
 public void looking_up_the_definition_of_pineapple_should_display_the_corresponding_article() {
     endUser.is_the_home_page();
     endUser.looks_for("pineapple");
     endUser.should_see_definition_containing_words("A thorny fruit");
 }

This feature is currently available for junit stories but we’ll extend it shortly to jbehave and easyb.

Other enhancements and bug fixes

  • Uninstantiated page objects in step libraries are now automatically instantiated.
  • Fixed a bug that caused tests to wait unnecessarily in subsequent steps after a step had failed.
  • A custom requirements tag provider, if specified, will be given preference over the default file system based requirements provider.

Keep watching this space for more updates and announcements.

4
Jan

Thucydides Release 0.9.90 – Improved reporting format for jBehave data-driven tests


Improved jBhave examples reporting

Our latest release (0.9.90) introduces a more user friendly report format for data-driven (example-driven) jBehave tests.

The following screenshots will explain the changes in detail.

All examples are displayed in a table.

All examples are displayed in a table on top.


The top level step shows example data for easy reference

The top level step shows example data for easy reference.


Error Steps are highlighted in red for easy identification.

Error Steps are highlighted in red for easy identification.


Currently, this feature is available only for jBehave tests but will soon be integrated with jUnit and easyb tests as well.

Support for iPhone and Android Selenium web drivers

Basic support for iPhone and Android web drivers is now available in Thucydides. Set the property webdriver.driver to ‘iPhone’ or ‘Android’ when running your tests.

Bug Fixes

  • Thucydides-117: Fixed a regression defect that had caused thucydides.take.screenshots to break in the previous release.

15
Aug

Thucydides Release 0.9.12 – jBehave Integration


A new update to Thucydides was just released – Release 0.9.12.  This release integrates a popular BDD framework, jBehave, with Thucydides.

jBehave Integration

jBehave is one of the most widely used BDD frameworks in Java.  Our latest release lets you define user stories in jBehave. These stories can then be implemented using Thucydides step libraries. When the stories are run, Thucydides will provide a rich set of reports that help you see how the stories are progressing. To learn more, check out the Writing Acceptance Tests with JBehave section of the documentation.

Other minor enhancements and fixes

  • Jira issues can now be specified using both full and abbreviated JIRA links (e.g. MYPROJECT-123 and #123).
  • Multiple file paths can now be specified in the @UseTestDataFrom annotation for data driven tests. Earlier, this annotation supported only a single path. You can now specify several paths (separated by the usual path separators – colon, semi-colon or comma).
  • Reports now open Jira links in a new window or tab.
  • The HtmlTable class can now be used to read tables without headers (i.e., <th> elements) . Earlier  this was not possible.  But you can now specify your won headings using the new withColumnsmethod. For example,
    List<Map<Object, String>> tableRows =
                        HtmlTable.withColumns("First Name","Last Name", "Favorite Colour")
                                 .readRowsFrom(page.table_with_no_headings);

Thucydides is a very active project with frequent releases. Keep watching this space for more announcements. Meanwhile, if you have any queries, shoot us an email using the official mailing list or report a bug in Jira.

23
Jul

Thucydides Release 0.8.31 – Enhancements and bug fixes


Thucydides Release 0.8.31 is primarily a bug fix and enhancement release but goes a long way in making Thucydides more robust. We have added a couple of minor features and fixed issues related with data tests and screenshot management.

Implicit wait property (#Thucydides-83)

Thucydides now supports Selenium’s implicit wait. An implicit wait causes WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance. This is now supported in Thucydides with the property webdriver.timeouts.implicitlywait. Set this property to the number of milliseconds that you want WebDriver to wait implicitly.

Data driven tests now support private fields

When writing data driven tests in Thucydides step libraries, it was required to declare the fields as public or define them as properties (i.e., with getter and setter methods). Well, not any more. You can now keep the fields private if you wish and Thucydides will still inject the values correctly. See using data driven tests for individual steps in the user manual on how data driven testing works in Thucydides step libraries.

Resizing screenshots

You can now use the thucydides.resized.image.width system property to resize saved screenshots in order to save disk space.

Other fixes and enhancements

  • (#Thucydides-59) : Fixed a bug where temporary screenshots were left undeleted in temporary directory even after the report was run causing disk space to get wasted.
  • (#Thucydides-75) : Parameterized tests were run in a single browser even if @Managed annotation’s uniqueSession property was not explicitly set to true. This bug is now fixed. A new browser session will now be started for each parameterized test if uniqueSession is not set to true and a restart frequency is specified using thucydides.restart.browser.frequency property.
  • (#Thucydides-80): For a test that failed assertions in a @StepGroup method, screenshots were still present even if the property thucydides.only.save.failing.screenshots was set to false. If thucydides.only.save.failing.screenshots was set to true then a link to the screenshot was broken and “file not found” appeared. This issue has been fixed.
  • (#Thucydides-84) : When tests extend one another with a webdriver declared in both parent and sub class using @Managed annotation, webdriver was getting injected only in the parent test class. This is now fixed.
3
May

Thucydides Release 0.8.8 – A more fluent API for Page Objects


We released a new version of Thucydides (0.8.8) yesterday with an exciting new feature and some bug fixes. Here’s a list of what went in.

A fluent API for Page objects

The Page Object API has been enhanced for a more readable, fluent interface with new methods like ‘find’, ‘findBy’ , ‘then’ and ‘waitFor’ etc.

For example, you can use webdriver ‘By’ finders as follows:

page.find(By.name("demo")).then(By.name("specialField")).getValue();

or

page.findBy("#demo").then("#specialField").getValue();

The new method ‘waitFor’ and its derivatives ‘waitForPresenceOf’ and ‘waitForAbsenceOf’ offer more concise and expressive alternatives to the existing wait methods. These methods take a String argument representing the xpath or css selector and can be used as follows:

page.waitFor("#city");
page.waitForPresenceOf("#firstname");

Other changes and Bug Fixes

  • Performance improvement: screenshots are now written to the disk in the background, so as not to slow down the tests.
  • (#THUCYDIDES-61) You can now define Thucydides properties in a thucydides.properties file in the working directory.
  • (#THUCYDIDES-60) A new system option, ‘thucydides.jquery.integration’, has been added to deactivate JQuery integration.
  • (#THUCYDIDES-59) Duplicated screen shots are now removed.
  • (#THUCYDIDES-57)  If there are two or more consecutive steps with the same name, second and next screen shots were not presented in the report due to this bug. Now there will be at least one screen shot for each step.
  • (#THUCYDIDES-56) Added the withActions() method to the PageObject class to support the WebDriver Actions API. You can also invoke WebDriver Actions directly e.g.,
    Actions builder = new Actions(page.getDriver());
    builder.moveToElement(page.firstName).perform();
  • (#THUCYDIDES-55) You can now call the JavascriptExecutorFacade directly with the driver obtained from the PageObject class e.g.,
    	
    JavascriptExecutorFacade js = new JavascriptExecutorFacade(page.getDriver());
    js.executeScript("$('#firstname').focus();");

    The executeScript() method also supports passing parameters to the Javascript function

  • (#THUCYDIDES-53) Fixed a bug that was causing report files to get split in two directories  when maven “build directory” was changed.
  • (#THUCYDIDES-54) Fixed NullpointerException in Android emulator.
  • (#THUCYDIDES-50) A minor bug with inconsistent naming of reports for data driven tests has been fixed.
  • (#THUCYDIDES-13,15) All tests in a given unit test now run in a single browser session.
  • Statistics are now tied to a project, so that multiple projects can be logged in the same database.

Let us know how the changes look.

29
Feb

New features in Thucydides 0.7.10


The latest version of Thucydides (0.7.10) to be released has some great new features! Find out more below:

Flag a test as ‘pending’ or ‘ignored’ from within a test step/page object
This is useful if a test can’t be completed for reasons outside the scope of the test, which occasionally happens with acceptance tests. To do this, just call ‘Thucydides.pendingStep()’ or ‘Thucydides.ignoredStep()’, as shown here:

public String findFirstPartiallyPublishedBookingId() {
    String partiallyPublishedBookingId = null;
    try {
        partiallyPublishedBookingId = getFirstBookingIDWithStatus("Partially Published");
    } catch (NoMatchingBookingFoundError e) {
        Thucydides.pendingStep("No partially published booking available");
    }
    return partiallyPublishedBookingId;
}

Both methods take a message as an argument, which appears in the final report, on the screenshot corresponding to the step where this occured. Any steps following a pending step will be flagged as ‘ignored’. Any steps following a step marked as ‘ignored’ in this way will be executed normally.

Improved reporting
The reports in Thucydides 0.7.10 come with a brand new dashboard which provides you with a quick overview of the state of your tests, as well as many other improvements:

New, improved dashboard

Proxy support
If you need to use a proxy to access the web site you are testing, you can now do this by providing the system properties thucydides.proxy.http and thucydides.proxy.http_port. Note: This feature is currently supported for Firefox only.

Tell us what you think of the changes…