Skip to content

Kaspresso 1.2.0: AdbServer

Compare
Choose a tag to compare
@matzuk matzuk released this 15 Sep 09:09
· 717 commits to master since this release
cd923af

Autotest AdbServer

AdbServer is a part of Kaspresso

We've decided to merge AdbServer into main Kaspresso repository. AdbServer is very tied with Kaspresso and there is no mind to maintain two separate repositories. Further support and development should be easier.

New AdbServer logging

AdbServer logging is more enjoyable, suitable, and understandable now.
Take a look at the example of logs from the Deskop:

INFO 10/09/2020 11:37:20.185  desktop=Desktop-25920 device=emulator-5554   message: The attempt to connect to Device was a success

You can see the type of a message, date and time, the desktop executing the message and the emulator giving the task, and the message.
Another example of logs from the Device:

2020-09-10 12:24:27.427 10349-10378/com.kaspersky.kaspressample I/KASPRESSO_ADBSERVER: The result of command=AdbCommand(body=shell su 0 svc data disable) => CommandResult(status=SUCCESS, description=exitCode=0, message=, serviceInfo=The command was executed on desktop=Desktop-30548)

Here is very useful information about where the command was executed. In this example, the command was executed on Desktop-30548.
You can choose an appropriate type of logging: VERBOSE, DEBUG, INFO, WARN, ERROR. INFO is a default type providing all basic logs. In some cases VERBOSE and DEBUG modes could be useful too.

Also, a lot of potential bugs and issues were fixed. All information is available in AdbServer wiki.

Fixes and improvements

  • Updated Network implementation is able to turn on/off network even without running AdbServer.
  • Improved compose with extended API.
  • Fixed Logcat implementation that required AdbServer to be run before every test.
  • StepInfo is available in every step now.
  • Added more flexible way to struct folders after screenshot tests.
  • Bumped library versions.
  • Improved samples stability.
  • Many small bugs has been fixed.

Breaking changes

  1. We've totally reworked AdbServer and Kaspresso 1.2.0 works only with new artifacts/adbserver-desktop.jar
    The old version artifacts/desktop_1_1_0.jar is also available for use with older versions of Kaspresso.
  2. If you use device.logcat in your tests, you should call device.logcat.disableChatty in the before section of your test.
    In previous version of Kaspresso, device.logcat.disableChatty was called automatically during initialization. This resulted in the need to always run AdbServer before tests.