cancel
Showing results for 
Search instead for 
Did you mean: 

Error while loading a test case in readyapi-3.2.5

SOLVED
Highlighted
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.

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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

View solution in original post

6 REPLIES 6
Highlighted
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
Highlighted
Contributor

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

 

Highlighted
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

View solution in original post

Highlighted
Community Manager

Thanks a lot Richie.

 

@anand1 Which option did you choose? Please share🙂


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Contributor

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.

 

 

Highlighted
Community Manager

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


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors