Idea ID: 2798211

Need after check "mark http erros as warnings" the script be PASSED

Status : Waiting for Votes
Waiting for Votes
See status update history
over 1 year ago

In some aplication that we are testing, it is normal to get some error code like 403 or 422. In these cases we mark the transaction as "Pass" using the "lr_set_transaction_status(LR_PASS)"

For avoid these situation, we have used "lr_continue_on_error" to be able to continue executing the script and "lr_set_transacion_status (LR_PASS)" to mark as "PASS" the transaction.

But with these 2 workaround, we have continue our script running and we have put the transaction to PASSED but our script status still been FAILED.

We need a function to change the final script status to PASSED if we have changed any transaction to from FAILED to PASSED.

Tags:

Labels:

Protocols
  • Hi  

    I think you missunderstood "continue on error" and "mark http erros as warnings".

    As you explained you set the transaction to "Pass" by force, and check on "continue on error" to make the script continue executing.

    The web step was still "falied". It makes sense.

     

    If you want to skip http errors, you need to check on "mark http erros as warnings" in RTS > "Preferences".

    If you don't want to skip all web http steps but only specific step(s), you can add

    API web_set_rts_key to enable the setting before the issue step, and disable it after.

    For example,

    web_set_rts_key("key=HttpErrorsAsWarnings", "Value=1", LAST);
    web_url("error_page_warning",
                       "URL=https://nghttp2.org/httpbin/status/404",
                        LAST);
    web_set_rts_key("key=HttpErrorsAsWarnings", "Value=0", LAST); 

     

    Regards,

    Wei-Wei Zhang