Forum Discussion

shutch's avatar
shutch
New Contributor
6 years ago

Error java.lang.NullPointerException: Connot invoke method get() on null object error at line: 14

Hello, 

 

I am getting the following error when trying to run tests on my Production environment:

 

Error java.lang.NullPointerException: Connot invoke method get() on null object error at line: 14

 

The weird part is I can run these tests succufully on my Dev, QA and UAT environments without an issue. The other strange thing is I am using this Test Step in multiple testcases.  I have around 100 tests in my stuite, and roughly 15 are failing on the same TestStep in Production environment only.  The tests are GET calls.  I have attached the error message and code.

 

Thanks!

 

 

  • Have you checked to see if the response you are getting from production contains that header? The error you are getting makes me think that the header you are looking for is not being returned in the produciton response.

    • shutch's avatar
      shutch
      New Contributor

      I checked the header responses in all environemnts and they are the same.

      • groovyguy's avatar
        groovyguy
        Community Hero

        What, exactly, is providing this error? A groovy script assertion? Something else? More details would be appreciated!