ovidoo83
14 years agoOccasional Contributor
Run Groovy script issue: java.lang.NullPointerException
Hi!
I have a question regarding the scripting feature.
I have a teststep as a groovy script that contains this code:
def p1 = "cmd /c cd c:\\Python26".execute()// Create the String
def p2 = "cmd /c c:".execute()// Create the String
println p2.text
def p3 = "cmd /c c:\\Python26\\python.exe d:\\Work\\AutomatedTesting\\Repository\\IRAutomation\\Tests\\runSelenium.py".execute()// Create the String
println p3.text
if I run just this test step individualy it works great, BUT if I run the whole TestCase it fails at this test step with: TestCase failed [java.lang.NullPointerException: java.lang.NullPointerException], time taken:144
I have a question regarding the scripting feature.
I have a teststep as a groovy script that contains this code:
def p1 = "cmd /c cd c:\\Python26".execute()// Create the String
def p2 = "cmd /c c:".execute()// Create the String
println p2.text
def p3 = "cmd /c c:\\Python26\\python.exe d:\\Work\\AutomatedTesting\\Repository\\IRAutomation\\Tests\\runSelenium.py".execute()// Create the String
println p3.text
if I run just this test step individualy it works great, BUT if I run the whole TestCase it fails at this test step with: TestCase failed [java.lang.NullPointerException: java.lang.NullPointerException], time taken:144