Ask a Question

Error while loading a test case in readyapi-3.2.5

SOLVED
anand1
Contributor

Error while loading a test case in readyapi-3.2.5

Hi, 

 

Recently i created a test case that involves few database calls, and i did some calculations, now whenever I am launching readyapi (Version - 3.2.5), I am always getting error in the readyapi logs as 

 An error occurred [error: Premature end of file.], see error log for details
 An error occurred [java.lang.NumberFormatException], see error log for details

 

And when i look in the Error logs, I found this info

https://pastebin.com/J2B1f2vU

 

I am not able to find which step is causing this error, reason when i run the test case I do not see it failed at any step.

 

Please advice.

 

6 REPLIES 6
richie
Community Hero

Hey @anand1,

So the warning is generated when you launch ReadyAPI!, but not when you execute the specific test?

If error doesnt generate when yoy execute the test what makes you think the error is due to that particular test.....im assuming you have multiple tests and perhaps multiple projects within your workspace?
If youre sure the error warning is due to that specific test case, have you tried deleting (then relaunching ReadyAPI! to check if error is reported) and recreating the testcase (then relaunching ReadyAPI! to check if error is reported) ??

You could also once the testcase is deleted start recreating it a step at a time and relaunch ReadyAPI! checking for the error after each teststep is created?

Other than when ReadyAPI! launches, is the error impacting any other functional behaviour?

Nice one

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

Thanks @richie 

Yes the error warning is generated when i am launching the readyapi and it launch with an existing workspace along with all the tests.

 

And i did had multiple testsuite and testcases earlier , but I removed all except one which is the latest i m working, and the error warning still persists, so I am certain the error is coming from this test case/suite only.

 

And then i digged in further, i am able find the element in a test step which is creating a problem, still not able to figure out, that why it is throwing an error

So in my test case there is a DataGen Test step where in I have defined an element of type Template which is holding a value which is coming from the output of some previous step.

 

So when i run the test case till this step, everything works fine, but when i close ready api and re-launch it again, the same error still persists

It says like this :-

 

https://pastebin.com/2z8zkaa9

 

Does that help to figure out what i m doing wrong..?

 

Thanks for your support

 

richie
Community Hero

Hey @anand1,

Right i did some reading in regards to the error response and it appears (with my remedial understanding of what ive read) to be an in memory issue caused by the xml parser when it reads your project .xml file.

If you do a bit of reading yourself, at first you might think that perhaps there's an extra and invalid LF/CR character at the end of your project .xml file, but thats incorrect.

The issue is that the parser is finding some sort of corruption (that is of a lot lower level than just malformed .xml) and i dont believe theres anything you can do to resolve the issue.

The error isnt actually manifesting any bad behaviour right? Its just a case of a warning being generated when readyapi! launches, right?

I think you have either of two choices.

Just ignore it
OR
Create a new project with the same content again. Its unlikely the error would generate again (according to my interpretation of what ive read) if you recreate the same project content within a brand new project again.

Cheers...sorry i cant give you a fix for this,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
sonya_m
SmartBear Alumni (Retired)

Thanks a lot Richie.

 

@anand1 Which option did you choose? Please share🙂


Sonya Mihaljova
Community and Education Specialist

Thanks @richie 

 

I worked on by creating a new project altogether and i was still getting that error moment i added that step in my test case/

So i guess i will go with the first option as to Ignore it, as while execution i am not able to see any error in the logs.

 

 

sonya_m
SmartBear Alumni (Retired)

@anand1 I see. This sounds reasonable to me. Thank you for sharing!


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: