Lao Li share: Eclipse in the developmental test LoadRunner script

Source: Internet
Author: User
Tags throwable

Lao Li share: Eclipse in the developmental test LoadRunner script

I shared how to use LoadRunner to build javauser performance test scripting environment, this time I tell you how to develop LoadRunner script in eclipse How to configure the environment, Poptest is the only training institute in the industry to develop test development engineers, To train students to do performance testing, automated testing, the ability to test tool development, to share a large number of performance test cases in Poptest class, due to limited personal experience, limited resources, can not allow the instructor's personal ability to keep up with the technical progress of the business, training institutions, lecturers are laurels, Poptest founder Li Eizhan, Wang Yuanbing and I all want to be able to teach students the first-line technology, so that students really learn the technology, and break the test training institutions of some vices, the lecturer's experience is weak, weak, training cases, such as a few problems, formed a strong curriculum of the development of the Expert Group, we formed a strong panel of experts, Continuous introduction of new cases, in the classroom to maintain a close integration of cutting-edge testing technology, we basically in each month's basic case will be a certain update. Let's look at how the LoadRunner script can be tested in eclipse.

When you create a new Java VUser with LoadRunner, the automatically generated action class references the "LRAPI.LR" package. The class file for this package is located under "LoadRunner root directory/classes/lrapi". Using these class files to generate the jar package, you can reference it in the Java project and write the LoadRunner script directly in Eclipse.

To generate the jar package process:

1, new project in Eclipse, named Lrapi.

2. Copy the Lrapi folder from the LoadRunner installation directory to the new project root in Eclipse, and refresh in eclipse to display the contents of the folder:

Export the jar package in 3,eclipse, and then click File-export-java (javafile). (select only the Lrapi folder when selecting Resources.) File name is Lrapi.jar), always next.

4, used in the introduction of the project:

packagedefaultpk;

/*

 * LoadRunner Java script. (Build: _build_number_)

 

 * Script Description: 

 *                     

 */

importlrapi.lr;

publicclassActions

{

    publicint init() throwsThrowable {

        return0;

    }//end of init

    publicint action() throwsThrowable {

        lr.start_transaction(null);

        System.out.println("This is a test for lrapi.jar");

        lr.end_transaction(null0);

        return0;

    }//end of action

    publicint end() throwsThrowable {

        return0;

    }//end of end

}

The rest of the work is to develop the scripts we need, and we'll talk about how to develop LoadRunner performance test scripts in other development tools, and if you're interested in the course, add qq:564202718

Original link: http://www.cnblogs.com/laoli0201

Lao Li share: Eclipse in the developmental test LoadRunner script

Related Article

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.