Forum Discussion

Deepali's avatar
Deepali
Occasional Contributor
10 years ago
Solved

"Unexpected end of file after null" error while execution REST test case with assertions.

I am getting error as "Unexpected end of file after null" while execution REST test case with assertions.

 

Steps:

1. create REST request in JSOn format.

2. Add assertions

3. Add request to tes case

4. Run test case

5. Click on test step to check request -response.

 

Expected Result: Resuest-Response should be displayed correctly.

Actual result: Getting error as "org.apache.xmlbeans.xmlexception:error:Unexpected end of file after null" in outline view. and <<Not JSON content> in JSON tab.

 

Observation: If I remove assertion, Request-Response are getting generated successfully.

  • Thanks Rao,

     

    But my content type was already application/json. I got the solution for this issue. There is a setting in Test case options with check box as "Diaply OK Result". If I unchecked it, I am able to see request and response.

6 Replies

    • Deepali's avatar
      Deepali
      Occasional Contributor

      Thanks Rao,

       

      But my content type was already application/json. I got the solution for this issue. There is a setting in Test case options with check box as "Diaply OK Result". If I unchecked it, I am able to see request and response.

      • nmrao's avatar
        nmrao
        Icon for Champion Level 1 rankChampion Level 1
        Good to know that you could proceed.
  • chmelvv's avatar
    chmelvv
    Occasional Contributor

    I found solution to uncheck "Search preceding TestSteps for property values" in TestCase options.

    But, from another hand, this settings can be needed sometimes.

     

     

  • chmelvv's avatar
    chmelvv
    Occasional Contributor

    Another root cause found:

    In one REST testStep I use properties from previous disabled  testStep. SoapUI try to  parse null file of previous testStep and get error. I deleted it and have no errors now.