Mark PASS or FAIL Test Status on BrowserStack Keywords FREE

BrowserStack is a remote test execution platform for automated tests written on Selenium based frameworks. Katalon seamlessly works with BrowserStack. This plugin helps to mark Katalon test case execution status PASS or FAIL on Browserstack platform.

32

Steps to follow,

Note - Make sure you are executing tests on a valid BrowserStack remote URL and have set up custom execution capabilities with minimum details - project, build and browser version.

  1. In Katalon, declare three variables in a profile file as below.

sessionid as String

bsUserName as String - Assign BrowserStack account login username [ use the same variable name ]

bsPassword as String - Assign BrowserStack account login password [ use the same variable name ]

  1. Insert below line of code in each Katalon test cases after 'Open Browser' step.

GlobalVariable.sessionid = CustomKeywords.'com.testwithhari.katalon.plugins.Browserstack.getCurrentTestRunSessionID'()

  1. Copy and Paste below method in Listener Class.

    @AfterTestCase def sampleAfterTestCase(TestCaseContext testCaseContext) { if(testCaseContext.getTestCaseStatus() != 'FAILED') { CustomKeywords.'com.testwithhari.katalon.plugins.Browserstack.updateTestName'(GlobalVariable.sessionid, testCaseContext.getTestCaseId()) CustomKeywords.'com.testwithhari.katalon.plugins.Browserstack.updateTestStatusAndReason'(GlobalVariable.sessionid, "PASSED", "Testcase is PASSED") } else { CustomKeywords.'com.testwithhari.katalon.plugins.Browserstack.updateTestName'(GlobalVariable.sessionid, testCaseContext.getTestCaseId()) CustomKeywords.'com.testwithhari.katalon.plugins.Browserstack.updateTestStatusAndReason'(GlobalVariable.sessionid, "Failed", "Testcase is FAILED") } }

    1. Execute test cases from Katalon and check test names and statuses updated accordingly in BrowserStack

Visit Katalon Forum for Plugin related discussions.

API keys are required in Katalon Studio Commandline Execution. Generate Key
Information
Project details
Version
1.0.0
Type
Custom Keywords Plugin
Last updated
June 15, 2019 7:25 pm
Publisher
Privacy and License Agreement