Forum Discussion

jagpreet08's avatar
jagpreet08
New Contributor
4 years ago
Solved

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?

  • 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.

     

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Details of assertion type and data please?
    • jagpreet08's avatar
      jagpreet08
      New Contributor

      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.

      • nmrao's avatar
        nmrao
        Champion Level 3
        Then it must be a ticket to Customer care team and follow up with them.