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.

421

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 ]

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

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

3.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")
              }
              }

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

Visit Katalon Forum for Plugin related discussions.

3.7
3 Rating(s)
Guilherme
January 8, 2021

Don't work

Sandra Ribeiro
October 24, 2019

Thank very much for this! As a newbie wit Katalon this was such a great help and easy to implement. I highly recommend this plugin .

TestWithHari
October 24, 2019

Hi Sandra Ribeiro, Thanks for the 5-star rating and your wondering comment. Let me know if you need more help.

Michael
August 23, 2019

Brilliant :) This plugin very much required while working with Katalon and Browserstack together. It helps to update the actual run status and test names on browserstack. I strongly recommend this plugin. Thanks

TestWithHari
August 24, 2019

Hi Michael, Thanks for your 5 start feedback. Let me know if you need any help. Thanks

API keys are required in Katalon Studio Commandline Execution. Generate Key
Information
Project details
Version
1.0.0
Type
Custom Keywords Plugin
Last updated
August 20, 2019 11:44 am
Publisher
Privacy and License Agreement