( Repost of issue in github - "Continue Recording" a Test Case deletes Web Service parameters · Issue #159 · katalon-studio/katalon-studio · GitHub )
Operating System: (for example: Windows 10 or OSX Sierra)
Windows 10
Katalon Studio Version:
6.1.5 build 3
Katalon Studio logs:
- Windows logs folder: \config.metadata.log
katalon.log
Environment (for Web testing):
Chrome Version 74.0.3729.169 (probably not relevant)
Environment (for Mobile testing):
Not applicable
Steps to reproduce:
- Create a new Web project
- Create a new WebServiceRequest in the Object Repository (e.g. ‘jsonplaceholder request’)
- Define a variable in the WSR Object and give it a default value (e.g. ‘1’).
- Create a new TestCase (e.g. ‘New Test Case’) and record some Web UI actions
- Add a ‘Web Service Keyword to the TestCase’ - a ‘Send Request’ call to the WebServiceRequest created above and set a different value for the variable
- Check that Script now includes variable for WS.sendRequest
WebUI.openBrowser('')
WebUI.navigateToUrl('https://jsonplaceholder.typicode.com/')
WebUI.verifyElementText(findTestObject('Object Repository/h2_Example'), 'Example')
WS.sendRequest(findTestObject('jsonplaceholder request', [('number') : '15']))
WebUI.closeBrowser()
- Save all files
- Click Record Web and select ‘Yes I do’ to continue recording.
- Run any selected lines in the UI test to open a browser, and record a new click on an item.
- Click OK and save any new resources
- Check Script - Variables for WS.sendRequest have been deleted.
WebUI.openBrowser('')
WebUI.navigateToUrl('https://jsonplaceholder.typicode.com/')
WebUI.verifyElementText(findTestObject('Object Repository/h2_Example'), 'Example')
WS.sendRequest(findTestObject('Object Repository/jsonplaceholder request'))
WebUI.closeBrowser()
WebUI.click(findTestObject('Object Repository/h2_Resources'))
- Confirm that variable value has been lost in Manual tab
Expected Behavior:
Recording additional items into an existing Test Case MUST NOT corrupt any existing lines in the test case.
Actual Behavior:
Any WebServiceRequests that call WS.sendRequest, WS.sendRequestAndVerify, and possibly others, will lose any variable definitions. No error or warning is displayed, and because the variables are only displayed when you double-click on the WSR Object name, it’s an INVISIBLE DELETION - and wreaks havoc on your code.
WS.sendRequest(findTestObject('Object Repository/jsonplaceholder request', [('number') : '15']))
has become
WS.sendRequest(findTestObject('Object Repository/jsonplaceholder request'))
This happens for multiple variables - all are removed.