How Any Business Can Take Advantage of Kobiton’s New Plan Options
Kobiton is a powerful mobile device platform that offers real mobile devices for both testers and developers. Katalon Studio is a free and easy-to-use automated functional and regression testing platform. It provides users the ability to implement full automated testing solutions for their application projects with minimal engineering and programming skill requirements. Using Katalon Studio, you can easily execute automated tests on Kobiton’s devices. In addition, Katalon has just released the latest version, Katalon Studio 7, with several enhancements and the integration between Kobiton and Katalon has been changed a little bit.
In this blog, I will use the Sample Android Mobile Tests Project on Katalon Studio for the whole guideline. First of all, I will create it as the screenshot below:
3. Just go back to Katalon Studio, from the main toolbar, click on the drop-down menu of Run, and select the option to run with Kobiton Device. We can see the list of devices that we have already bookmarked.
3. Modify the sample codes on the Katalon test case. Replace ‘Start Application’ keyword with these lines. These codes will establish a connection to selected Kobiton’s device and also create a driver to be used for other built-in keywords. Thus, you don’t have to rewrite the whole test script again.
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import org.openqa.selenium.remote.DesiredCapabilities import com.kms.katalon.core.appium.driver.AppiumDriverManager import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration import com.kms.katalon.core.mobile.driver.MobileDriverType import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.util.internal.PathUtil as PathUtil import internal.GlobalVariable as GlobalVariable import io.appium.java_client.android.AndroidDriver 'Instead of using Start Application keyword, we use the below code to create a similar driver so that other Mobile built-in keywords can re-use this driver.' String kobitonServerUrl = "https://joeybrown:firstname.lastname@example.org/wd/hub"; DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("sessionName", "Katalon Kobiton Integration"); capabilities.setCapability("sessionDescription", "This is an example for the integration between Katalon and Kobiton."); capabilities.setCapability("deviceOrientation", "portrait"); capabilities.setCapability("captureScreenshots", true); capabilities.setCapability("app", "kobiton-store:184"); capabilities.setCapability("deviceGroup", "KOBITON"); capabilities.setCapability("deviceName", "Galaxy S10+"); capabilities.setCapability("platformVersion", "9"); capabilities.setCapability("platformName", "Android"); AppiumDriverManager.createMobileDriver(MobileDriverType.ANDROID_DRIVER, capabilities, new URL(kobitonServerUrl)) Mobile.tap(findTestObject('Application/android.widget.TextView - App'), 10) Mobile.tap(findTestObject('Application/App/android.widget.TextView-Activity'), 10) Mobile.tap(findTestObject('Application/App/Activity/android.widget.TextView-Custom Dialog'), 10) 'Get displayed message on the dialog' def message = Mobile.getText(findTestObject('Application/App/Activity/Custom Dialog/android.widget.TextViewCustomDialog'), 10) Mobile.comment('Then the correct dialog message should be displayed') Mobile.verifyEqual(message, 'Example of how you can use a custom Theme.Dialog theme to make an activity that looks like a customized dialog, here with an ugly frame.') Mobile.closeApplication()
4. From the main toolbar, click on the drop-down menu of Run, and select the option to run with Kobiton Device.
5. Once Katalon Studio is finished, automation test execution will be uploaded to Kobiton. Navigate to Sessions menu to view: