LoadRunner programming out of Iteration "exit (-1) and return 0"

Source: Internet
Author: User

Only one iteration has been run and it's over.

LR脚本实践:关于lr中exit(-1)和 return 0的区别 exit(-1):从当前action里面exit(-1)所在行,当前迭代里面直接退出来,终止运行; return 0:忽略当前action里面 return 0后面的脚本,直接运行下一个action,以及下一个迭代; 比如做了个测试: Action6() {   int count = 0;   if (count ==0)   {     lr_output_message( "%d" ,count);     exit(-1);   }     lr_output_message( "test!" ); } 运行的时候,程序在第一次迭代里面,Action6.c(6): 0执行到这句就终止了; Action6() {   int count = 0;   if (count ==0)    {     lr_output_message( "%d" ,count);     return 0;    }     lr_output_message( "test!" ); } 运行的时候,程序在第一次迭代里面,Action6.c(6): 0执行到这句,然后跳到下一个action,下一个迭代;

LoadRunner programming out of Iteration "exit (-1) and return 0"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.