Friends, finally the moment came when our team finished work on the long-awaited release of
TestCafe v.14.2 and we can share with you the results of our work with great joy. In the new version, we tried to make the maximum emphasis on the visual recorder of tests, completely reworking its concept, making it easier and more intuitive.
Now it contains a complete set of tools for the entire test creation cycle. In addition, we have made efforts to improve the functional core TestCafe, this has added the long-awaited support for
cross-domain i
- frames and the ability to upload files to the server. If you are interested in getting to know our wonderful product and its innovations, I ask you for a cat - to a cozy corner of functional testing from TestCafe ...
For those who are not yet familiar with our coffee creation, I’ll briefly explain: TestCafe is a test framework designed to automate functional testing of web sites, built on the original idea of ​​proxying all site content, incorporating the test code and environment into it. . Before the existing solutions, this concept has a huge number of advantages that can greatly facilitate the life of the final tester. A description of the atypical solutions and merits of TestCafe is a very pleasant thing, but, unfortunately, is beyond the scope of this article, therefore, if readers are interested, we would rather give it a separate post.
')
And now let's move directly to the innovations that await you after installing the new version.
TestCafe can be divided into three main parts - a
visual recorder ,
a control panel and a
core . According to this principle, for convenience, I will share all major innovations into relevant categories:
Visual recorder
The pride of our team, thanks to him, the user can record tests directly on his site, without thinking about its structure and principles of work. The recorder simply intercepts all actions on the page and forms “steppes” based on them, of which the test will be made later. All the tester needs is to “click” the script to be tested. In most cases, you do not even have to open the resulting test code, as the recorder now provides all the necessary visual tools for editing.
- Steps- panel . In the new version, we revised the concept of the graphic component of the recorder and completely reworked it, trying to make the test recording process more convenient and transparent. Now all the steps generated based on user actions interactively appear in the steps- panels, allowing you to monitor its structure in real time.

- Editing steps . Now you can delete steps and change their order right in the recorder without stopping the recording process. The ability to edit the steps remains, the corresponding dialog will open when you click on the step.

- Playback Another nice innovation is the ability to “play” recorded steps without leaving recording mode. This makes it possible to reproduce the steps after editing them, to make sure that the changes made did not affect the integrity of the test, correct errors on failure, and continue recording.

- Adding assertion . One of the most annoying shortcomings of the previous version was the lack of the ability to visually add assertion . The user had to record a test recorder, and then manually add checks directly to the code. Now this opportunity has appeared: You can add assertion using a graphical interface; the built-in wizard will help you select the item to be checked and its parameters. This allows you to create ready-made tests without leaving the TestCafe GUI.

- Improved page readiness . One of the convenient features of our framework is that it takes on the responsibility of waiting for the page to be ready for the next step. This eliminates the need to add a lot of potentially dangerous wait , TestCafe itself waits for the end of all XHR requests, postback , resource loads, etc. In addition, in the new version, the recorder generates “smart” selectors for elements of the steppes, which in most cases do not obstruct the mechanisms waiting for the end of the js animation, this will happen automatically.
Core
Having finished with the recorder, we smoothly go to the heart of TestCafe - the proxy core. It serves as an interlayer between the test site and the business logic of the framework, providing an API for intercepting all user actions (in test recording mode) and their further simulation (in test playback mode). This module is submitted by us to a separate subproject, which allows you to gain complete control over the site, proxying and processing all its resources. The problems we encountered in developing this module also deserve a separate article, which we will try to publish in the near future. So, what is new in the new version?
- Support cross-domain of iFrames . Now TestCafe uses two internal proxy servers on two different ports, using them cross-domain iFrames and their content are proxied through a cross-domain proxy, which allows you to most accurately simulate the behavior of the test page. You can test the contents of cross-domain iframes just like any other elements.
- File uploading . In the new version, the recorder automatically intercepts file downloads into the browser and saves them to the test folder, generating at the same time the corresponding test step. This will allow you to test working with local files on your site, without unnecessary actions, simply and transparently.
- Support for contenteditable elements . Added support for working with contenteditable elements, which allows you to test the increasingly popular in- place editors.
- Optimization . We paid much attention to optimizing the processing of site resources. To do this, a lot of code was rewritten, and some third-party modules were replaced with their own, as a result of which we were able to accelerate the passing of tests.
- Drop on js errors . Now the test is not considered passed if an exception has occurred in user scripts, information about which can be viewed in the report. This will allow you to catch hidden errors that may not manifest themselves for the time being.
Control Panel
Management of tests, their launch and reports occurs through the control panel. It is a web shell with which TestCafe projects are managed. Let's see what's new here.
- Projects We reworked the principle of storing and presenting tests. If before all the tests were simply stored in a folder, now we offer users to work with projects: create them, quickly and conveniently switch between them.

- Notifications Now notifications about passing tests are displayed in a pop-up window, regardless of which tab of the control panel you are in.

This list, of course, is not complete, it contains the main, striking innovations. In the new version, we also fixed a large number of internal errors and made a serious optimization of the code. We hope that our user will appreciate the new functionality, and if you are not yet a new one, it's time to become.
TestCafe team.