Forum Discussion

Madhav's avatar
Madhav
Occasional Contributor
6 years ago

Getting error :- java.lang.NullPointerException:Cannot invoked method run() on null object error

Hi Team,

I am getting below error when i am running test suite through groovy script

Getting error :- java.lang.NullPointerException:Cannot invoked method run() on null object error

def project = testRunner.testCase.testSuite.project

def suite = context.testCase.testSuite.project.testSuites ['TestSuite2']
suite.run (null, true)

 

 

 

 

 

 

1 Reply

  • JHunt's avatar
    JHunt
    Community Hero

    Looks like you don't have a test suite called

    TestSuite2

    Perhaps it should be this?

    TestSuite 2