When the manual view of a Test Case is modified, Katalon Studio alters the Groovy source. In some cases this makes the test unusable.
See steps to reproduce in the test case below.
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
/*
* Steps to reproduce:
* 1. Run this test case in order to make sure it works and what it does.
* Note it prints in console this lines:
*
This is a
multiline text
that interpolates a value: 0
* 2. Note the original source is:
<JavaDoc>
def myMeth() {
return 0
}
def info = """
This is a
multiline text
that interpolates a value: ${myMeth()}
"""
println(info)
* 3. Go to the Manual View of this test case
* 4. Insert any keyword (for example Delay)
*
* Result: the groovy source has been altered so that bugs have been introduced (it cannot be executed)
*/
/**
* Method to test that this piece of javadoc is not moved with the method
* @return 0
*/
def myMeth() {
return 0
}
def info = """
This is a
multiline text
that interpolates a value: ${myMeth()}
"""
println(info)