cancel
Showing results for 
Search instead for 
Did you mean: 

Assertion script not working in latest ReadyAPI version

SOLVED
Highlighted
New Contributor

Assertion script not working in latest ReadyAPI version

I have an assertion script for one of the test case and it's working fine in ReadyAPI version 2.8.2 but the same assertion is not working in latest ReadyAPi 3.7 version. And giving the following error - General error during class generation: Method code too large! java.lang.IndexOutOfBoundsException.

Any resolution for this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Assertion script not working in latest ReadyAPI version

Hey @jagpreet08 :

 

Recently i got this error while working, what i found is number of line inside a block is limited to around 500 something,

 

How i resolve that by converting the same set of code to different functions so that my code was limited to 300 or something line. and that works. 🙂

 

You can try to achieve this by breaking your code in small blocks instead of writing 1 big block.

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Assertion script not working in latest ReadyAPI version

Details of assertion type and data please?


Regards,
Rao.
Highlighted
New Contributor

Re: Assertion script not working in latest ReadyAPI version

It's a big script containing validations of more than 100 fields....with If else loop for every field.

 

So if I am converting this big assertion script into two assertion scripts, then it works fine in ReadyAPI 3.7 version as well. Just wondering how to make it work with the single assertion script. Though single script working fine in readyAPI 2.2.7 version.

Highlighted
Community Hero

Re: Assertion script not working in latest ReadyAPI version

Then it must be a ticket to Customer care team and follow up with them.


Regards,
Rao.
Highlighted
Community Leader

Re: Assertion script not working in latest ReadyAPI version

Hey @jagpreet08 :

 

Recently i got this error while working, what i found is number of line inside a block is limited to around 500 something,

 

How i resolve that by converting the same set of code to different functions so that my code was limited to 300 or something line. and that works. 🙂

 

You can try to achieve this by breaking your code in small blocks instead of writing 1 big block.

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors