-
public interface AdbServerThis is a comfortable wrapper to work with AdbServer repository.
Required: Started AdbServer 1. Download a file "kaspresso/artifacts/adbserver-desktop.jar" 2. Start AdbServer => input in cmd "java -jar path_to_file/adbserver-desktop.jar"
Important notes:
Real connection is established only after a call one of methods of the interface except disconnectServer(). So it's lazy wrapper. Keep it in your mind when you decide to put custom implementation od AdbServer.
Kaspresso calls disconnectServer() after each test if the connection was established during the test.
-
-
Method Summary
Modifier and Type Method Description abstract List<String>performCmd(Array<Out String> commands)Executes shell commands blocking current thread. abstract List<String>performAdb(Array<Out String> commands)Performs adb commands blocking current thread. abstract List<String>performShell(Array<Out String> commands)Performs shell commands blocking current thread. abstract UnitdisconnectServer()Disconnect from AdbServer. -
-
Method Detail
-
performCmd
abstract List<String> performCmd(Array<Out String> commands)
Executes shell commands blocking current thread. Please be aware! If any command that is in @param commands failed then AdbServerException will be thrown
Required Permissions: INTERNET.
- Parameters:
commands- commands to execute.
-
performAdb
abstract List<String> performAdb(Array<Out String> commands)
Performs adb commands blocking current thread. Please be aware! If any command that is in @param commands failed then AdbServerException will be thrown
Required Permissions: INTERNET.
- Parameters:
commands- commands to execute.
-
performShell
abstract List<String> performShell(Array<Out String> commands)
Performs shell commands blocking current thread. Please be aware! If any command that is in @param commands failed then AdbServerException will be thrown
Required Permissions: INTERNET.
- Parameters:
commands- commands to execute.
-
disconnectServer
abstract Unit disconnectServer()
Disconnect from AdbServer. The method is called by Kaspresso after each test.
-
-
-
-