Fresh baked goods from TestCafe - 14.2 release

Friends, the moment has finally come when our team finished work on the long-awaited release of TestCafe v.14.2 and we are happy to share the results of our work with you. In the new version, we tried to make maximum emphasis on the visual test recorder, completely reworking its concept, making it simpler and more intuitive.
Now it contains a complete set of tools for the entire cycle of creating tests. In addition, we made efforts to improve the functional core of TestCafe, this allowed us to add the long-awaited support for cross-domainIP frames and the ability to upload files to the server. If you are interested in getting to know our wonderful product and its innovations closer, I ask you to go to the cozy corner of functional testing from TestCafe ...
For those who are not familiar with our coffee creation, I’ll briefly explain: TestCafe is a test framework designed to automate functional testing of websites, built on the original idea of proxying all site content, with the implementation of test code and environment resources in it . Over existing solutions, this concept has a huge number of advantages that can greatly facilitate the life of the final tester. Description of atypical solutions and advantages of TestCafe is a very pleasant matter, but, unfortunately, is beyond the scope of this article, therefore, if readers are interested, we better give it a separate post.
And now let's go directly to the innovations that are waiting for you after installing the new version.
TestCafe can be divided into three main parts -visual recorder , control panel and core . According to this principle, for convenience, I will divide all the main innovations into the relevant categories:
Visual recorder
The pride of our team, thanks to it, the user can record tests directly on his site, without thinking about its structure and principles of work. The recorder simply intercepts all the actions on the page and forms “steps” on their basis, from which the test will consist in the future. All that the tester needs is to “click on” the script being tested. In most cases, you don’t even have to open the resulting test code, since now the recorder provides all the necessary visual editing tools.
- 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 steps- panels, allowing real-time monitoring of its structure.
- Editing Steps . Now you can delete the steps and change their order directly in the recorder, without stopping the recording process. The ability to edit steps remained, the corresponding dialog will open when you click on the step.
- The Playback . Another nice innovation is the ability to “play” the recorded steps without leaving the recording mode. This allows you to reproduce the steps after editing them to make sure that the changes made did not affect the integrity of the test, correct errors upon failure, and continue recording.
- Adding assertion . One of the most annoying drawbacks of the previous version was the lack of the ability to visually add assertion . The user had to record a test with a recorder, and then manually add checks directly to the code. Now such an opportunity has appeared: you can add assertion using the graphical interface, a built-in wizard will help you choose the item to check and its parameters. This allows you to create ready-made tests without leaving the TestCafe graphical shell.
- Improved mechanism for waiting for page readiness . One of the convenient features of our framework is that it takes responsibility for waiting for the page to be ready for the next step. This eliminates the need to add many potentially dangerous wait , TestCafe itself waits for the end of all XHR requests, postback , resource downloads, etc. In addition, in the new version, the recorder generates “smart” selectors for step elements, which in most cases do not block the waiting mechanisms for the end of js animation, this will happen automatically.
Core
Having finished with the recorder, we smoothly move to the heart of TestCafe - the proxy core. It serves as a layer between the tested 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). We made this module in a separate subproject, which allows you to get full control over the site, proxing and processing all its resources. The problems that 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 for cross-domain e - frames . Now TestCafe uses two internal proxies on two different ports, using them cross-domain proxies and their content are proxied through a cross-domain proxy, which allows you to most accurately simulate the behavior of the tested page. You can test the contents of cross-domain ips as well as any other elements.
- File uploading . In the new version, the recorder automatically intercepts the downloading of files to the browser and saves them to the test folder, generating the corresponding test step. This will allow you to test the work 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 growing inplace 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 by their own, as a result of which we were able to accelerate the passage of tests.
- Crash on js errors . Now the test is not considered passed if an exception 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
Manage tests, run them and reports 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 earlier all 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 of 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, carried out serious code optimization. We hope that our user will appreciate the new functionality, and if you are not yet - it's time to become.
TestCafe team.