This is a memorandum on how to start the application automatic test tool Airtest.
People who have never used Airtest will be able to create simple runtime tests of applications from environment construction. (I hardly write a program)
Airtest Project Download it from this official website and install it.
Click Refresh ADB
with the actual device connected to the PC with a USB cable.
Then, the actual device will be listed in Devices> Mobile Phone Connection
.
The screen of the actual Android device connected in this way is displayed in synchronization.
Let's write a test that "touch when the specified button is found".
if(exists(button)):
touch(button)
The source code is very simple, but the point is how to define this button
.
As shown in the video, define the button
variable with an image.
Since the specified button existed like this, the touch process ran and the screen transitioned as expected.
I was able to create a test with almost no programming. I did the first time from installation to writing tests while writing this article, but I didn't get lost.
This time it was a very simple case of "touching when you find a button", but you can write a longer story and apply it in various ways such as tutorial breakthrough test, game main loop through test, application transition test etc. Many will come out).
By the way, the app used in this test is a game called Color Reduction Test made with Unity1Week.
Recommended Posts