TestCafe

This Blog

Archives

TestCafe Update (v14.1.2)

We have just released TestCafe v14.1.2 - a new version of our functional testing framework for web applications. There have been several changes to the product and I’d like to show off some of the more important new features and improvements.

(Not familiar with TestCafe yet? Read this FAQ)

Extended Reporter/CI API – The most popular continuous integration (CI) system report formats - JUnit and NUnit - are now supported.

Test Parameterization - TestCafe now provides a way to define data sets (test cases) and use them as inputs to run the same test with a different set of data each time.

Here’s how to specify several test cases within the test code and run the test with each of the different parameters:

'@test'['Data-driven testing'] = {
'@testCases': [
{ "@name": "Peter", login: "Peter Parker", password: "12345", group: "admin" },
{ "@name": "John", login: "John Smith", password: "test", group: "user" },
{ "@name": "Olivia", login: "Olivia Taylor", password: "qwerty", group: "moderator" }
],
'Type in input login': function () {
var input = $('#login_input');
act.type(input, this.login);
},
'Type in input password': function () {
var input = $('#password_input');
act.type(input, this.password);
},
'Click submit button': function () {
var submitButton = $('#submit_button');
act.click(submitButton);
},
'Check Result': function () {
var header = $('#group_header');
eq(header, this.group);
}
};

Parameterization 

If there are many test cases, you can save them to a separate JSON file. This is also useful if you are going to share these data sets with other tests and fixtures.

Mixins We’ve also added support for mixins that represent reusable test code snippets.

This example shows how to use a mixin to log in to an account before viewing or editing a profile. The "Authentication” mixin contains three steps: enter login, enter password, and click the "Submit" button. When you need to log in to an account, just call the "Authentication” mixin in the "Log In" step. This will allow you to re-use code without duplicating it:

'@mixin'['Authentication'] = {
'Type in input login': function () {
var input = $('#login_input');
act.type(input, 'Peter Parker');
},
'Type in input password': function () {
var input = $('#password_input');
act.type(input, '12345');
},
'Click submit button': function () {
var submitButton = $('#submit_button');
act.click(submitButton);
}
};

'@test'['View profile'] = {
'Log In': '@mixin Authentication',

'Click link "My Profile"': function () {
var link = $(':containsExcludeChildren(My Profile)');
act.click(link);
}
};

'@test'['Edit profile'] = {
'Log In': '@mixin Authentication',

'Click link "Edit Profile"': function () {
var link = $(':containsExcludeChildren(Edit Profile)');
act.click(link);
}
};

Improved Architecture - The TestCafe Core engine has been significantly overhauled to provide greater reliability and performance and to close many outstanding issues.

Test Run Metadata - A new property (this.__workerName) has been introduced to the TestCafe API. This allows your test code to retrieve the name of the current worker.

New Installer with GUI Runner for Mac OS Users - TestCafe for Mac OS now ships with a simplified installer that initializes the testing environment as well as installing the product. There is no need any more to unpack the TestCafe distribution and configure it using the command line.


When you launch TestCafé on the Mac, it will display a specific icon within the menu bar. Click this icon to access a context menu. This context menu allows you to open the TestCafe Control Panel, to copy TestCafe's URL to the clipboard, or to exit TestCafe.


You can also run TestCafe from the application launcher by clicking the TestCafe icon listed in Launchpad.

Get started today

TestCafe is easy to get started with. Just download, install, and you're ready to record your first test.

You can download the new version of TestCafe from our site (http://testcafe.devexpress.com/Download). We look forward to your feedback as you use TestCafe v14.1.2.

Published Jul 10 2014, 01:32 PM by
Filed under: ,
Bookmark and Share

Comments

Alexander Krakhotko (Xafari team)

for load testing ASP XAF apps?

July 14, 2014 10:32 AM

Marion (DevExpress Support)

Hi Alexander,

Yes, you can test ASP XAF apps using TestCafe. TestCafe is designed to test Web apps, and we support those controls whose elements and API can be accessible via JavaScript.

July 14, 2014 11:56 PM

Marion (DevExpress Support)

If you mean stress testing, this feature is not supported at present. We are planning to implement it in the context of the TestCafé - Implement stress testing (www.devexpress.com/.../S171947) thread. 

July 16, 2014 1:18 AM
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2016 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners