Business process automation is not only the goal of robot process automation (RPA), but also an important part of automated testing.

The initial stage of implementing automated testing is for individual applications to implement automated testing. The independent application test only involves one platform, but many business processes involve multiple applications and are cross-platform. For example, a typical e-commerce platform can contain client Web interface, Mobile client, background management system, API for interaction with other systems, and involve all platforms such as Windows, Mobile or Web.

There are limitations in automated testing for a single application. It is difficult to find problems in system integration, which leads to abnormalities in the online system and difficulty in automated testing for the whole process. The following scenario may sound familiar to you:

The company’s applications are generally divided into desktop, mobile, web and server. We usually use popular automated test libraries on each platform. For example, you can use Appium on mobile and Selenium on web. These tools work well on their own for mobile or Web testing, and automated test engineers can quickly learn to use them.

In some cross-platform scenarios, for example, when a user places an order on the mobile terminal, the administrator needs to apply the application on the web terminal or the desktop terminal to operate the order. At this point some engineers may find it difficult.

Automation across multiple platforms has always been a challenge, not only for automation test engineers, but also for RPA implementation engineers. So is there a solution that can reuse existing knowledge, use open source libraries that you are familiar with, and use open source frameworks and full-stack languages?

Today we are going to introduce an open and lightweight cross-platform automation solution.

According to statistics, JavaScript is the most popular on Github with the largest number of projects. You can develop tests for all platforms using JavaScript alone. The recommended solution here is to use open source Node.js + Cucumber as the driver framework, and open source tools such as Appium, Selenium and WebDriverio are used in the automation library, while CukeTest’s automation library can be used in the Windows automation part. CukeTest is also used in the development environment. This way you can do multi-platform testing in a single developer tool as long as you are familiar with the JavaScript language. A detailed example is provided below, along with a demo video.

Scenarios drive automated processes

Cucumber. Js is a popular behavior Driven (BDD) framework. The use of natural language description is one of the highlights of BDD. Specific can see https://github.com/cucumber/cucumber-js.

While general development project management is mainly about the management of the code side, behavior-driven testing provides us with a way to manage the entire test project from the management of use case documents. In CukeTest, different feature files can be defined according to different test scenarios, and corresponding functions can be verified by running different feature files. In the simultaneous automation of three ends, using CukeTest, it is easy to define different scenarios to complete the corresponding test project management.

M: Jason Seaver sent Carol an email on Windows. Carol was not in the office, so she sent a reply through the mobile app, saying that she would do it when she arrived. When she arrived at the office, Carol used Outlook Web on the browser to send an attachment to fulfill her boss’s request. These operations involve three scenarios, including Windows Mail, Outlook on mobile, and Browser Web applications. We split the process into three scenarios.

First write the scene description:

Use the appropriate open source libraries

Have a behavior-driven scenario, and then in the implementation code for Windows, Mobile, Web respectively to create different instances of automation library, run for different scenarios to call different instances of the run.

Implementing the scenario, writing the code is a long part for next time. . Here’s an overview of the open source libraries used.

For example, you can use Selenium, wd, or WebDriverio. Puppeteer, Chrome’s open source software, is also a good choice. The support of powerful third-party open source libraries makes you competent for any type of automation.

(As of press time, node.js has over 700,000 modules, source: www.modulecounts.com/)

Operating Windows controls use CukeTest’s own library, which can automate most desktop applications including C++,.net, WPF, QT, Delphi and other types of applications. For Web and Mobile, we use the open source WebDriver. IO library as the implementation library. For details about the API, see webdriver. IO /guide.html

Let’s take a look at how CukeTest can be used to automate Windows, Mobile, and Web simultaneously for these scenarios in a specific video.

Demo video:V.qq.com/x/page/i078…

We will explain how to develop and implement this Demo in a later article, so stay tuned.