2011 September | Official Serenity BDD Automated Acceptance Testing Blog
Introducing Thucydides
Thucydides on Github
Thucydides on Java.net
News
Presentations
Releases
Tips and Tricks
Tutorials
A new version of Thucydides – version 0.4.10 – is now available in the Maven repositories. In this version, we have added the Spring Integration features discussed in detail here , as well as a few small improvements and a minor bug fix.
If you are running your acceptance tests against an embedded web server (for example, using Jetty), it can occasionally be useful to access the service layers directly for fixture or infrastructure-related code. For example, you may have a scenario where a user action must, as a side effect, record an audit log in a table in the database. To keep your test focused and simple, you may want to call the service layer directly to check the audit logs, rather than logging on as an administrator and navigating to the audit logs screen.
Spring provides excellent support for integration tests, via the SpringJUnit4ClassRunner test runner. Unfortunately, if you are using Thucydides, this is not an option, as a test cannot have two runners at the same time. Fortunately, however, there is a solution! To inject dependencies using a Spring configuration file, you just need to include the Thucydides SpringIntegration rule in your test class. You instantiate this variable as shown here:
Then you use the @ContextConfiguration annotation to define the configuration file or files to use. The you can inject dependencies as you would with an ordinary Spring integration test, using the usual Spring annotations such as @Autowired or @Resource. For example, suppose we are using the following Spring configuration file, called ‘config.xml’:
We can use this configuration file to inject dependencies as shown here:
Other context-related annotations such as @DirtiesContext will also work as they would in a traditional Spring Integration test. Spring will create a new ApplicationContext for each test, but it will use a single ApplicationContext for all of the methods in your test. If one of your tests modifies an object in the ApplicationContext, you may want to tell Spring so that it can reset the context for the next test. You do this using the @DirtiesContext annotation. In the following test case, for example, the tests will fail without the @DirtiesContext annotation:
A new version of Thucydides – version 0.4.9 – is now available in the Maven repositories. This release provides support for the new Selenium 2.6 ExpectedConditions ( see here for details ), and also focuses on new features for integration with your issue tracking system. Read more
Selenium 2.6 provides a new API that allows more fluent wait conditions, such as waiting for several fields to be visible or enabled. This has been integrated into the Thucydides PageObject class with a helper method to make it a bit easier to use. Read more
A new version of Thucydides – version 0.4.8 – is now available in the Maven repositories.
One of the most important improvements in this latest version is that it uses Selenium 2.6 , which supports all versions of Firefox from 3.0 to 7. Previous versions of Selenium did not work well with Firefox 6 and 7.
Other improvements have been made in the reporting features. By default, Thucydides opens a browser with a width of around 1000px. Sometimes, this is not enough, and you need a larger window to see all of the elements on your page in the screenshots. Thucydides 0.4.8 lets you define the witdh of the browser Thucydides opens via the thucydides.browser.width command line option. Read more
A short presentation that introduces the philosophy behind the Thucydides Acceptance Testing library:
Acceptance Test Driven Development, or ATDD, has proven to be a very effective technique, both for driving and guiding development, and for enhancing communication between developers and other project stakeholders. But why stop there? Well designed Acceptance Tests can also act as a formidable documentation source and communication tool. Indeed, when written in a narrative, BDD-type style, Acceptance Tests have the potential to document in detail how the user interacts with the application.
Thucydides is a tool that lets you use WebDriver-based unit or BDD tests to write more flexible and more reusable WebDriver-based tests, and also to generate documentation about your acceptance tests, including a narrative description of test, along with the corresponding screen shots, and also high-level summaries and aggregations of the test results. Read more
Search
Blogroll Official Selenium Blog Thucydides on Github Thucydides User Manual Thucydides User Manual (Single Page) Wakaleo Consulting – The Thucydides Company
Official Selenium Blog
Thucydides User Manual
Thucydides User Manual (Single Page)
Wakaleo Consulting – The Thucydides Company
Archives July 2015 (1) May 2015 (1) April 2015 (1) March 2015 (2) August 2014 (1) July 2014 (3) March 2014 (1) December 2013 (1) May 2013 (1) March 2013 (2) February 2013 (2) January 2013 (4) December 2012 (1) November 2012 (2) October 2012 (1) August 2012 (1) July 2012 (1) June 2012 (2) May 2012 (3) February 2012 (2) December 2011 (2) November 2011 (1) October 2011 (5) September 2011 (7)
July 2015 (1)
May 2015 (1)
April 2015 (1)
March 2015 (2)
August 2014 (1)
July 2014 (3)
March 2014 (1)
December 2013 (1)
May 2013 (1)
March 2013 (2)
February 2013 (2)
January 2013 (4)
December 2012 (1)
November 2012 (2)
October 2012 (1)
August 2012 (1)
July 2012 (1)
June 2012 (2)
May 2012 (3)
February 2012 (2)
December 2011 (2)
November 2011 (1)
October 2011 (5)
September 2011 (7)
ATDD batch-strategy BDD data-driven easyb example-driven firefox fluent FluentLenium HtmlTable Java jbehave jenkins jira JUnit page objects parallel testing proxy support release release tags reporting reports requirements Safari screenshots screeshots selenium spring tags testing Thucydides webelementfacade
Follow Blog via Email Enter your email address to follow this blog and receive notifications of new posts by email.
Enter your email address to follow this blog and receive notifications of new posts by email.
About This is the official blog for the Thucydides automated acceptance testing library. It contains news and updates about Thucydides releases, as well as tips, tricks and tutorials on how to use Thucydides to improve your WebDriver-based web tests, and links to related material.
Pages Introducing Thucydides Thucydides on Github Thucydides on Java.net
Create a free website or blog at WordPress.com.