Use eclipse to compile the LoadRunner test script

Source: Internet
Author: User

Transferred from:

Http://hi.baidu.com/higkoo/blog/item/07b30d22357105b14623e892.html

This is really an afterthought. Today, I started to use eclipse to write the LoadRunner script.

In the past, most of them were written using the IDE provided by LoadRunner, and also used the visual stdio plug-in. To be more complex, use DLL or jar extension. Although debugging is troublesome, it is worthwhile to pack common functions and methods once and for all.

Recently, the project has been busy and we hope to develop test scripts quickly.

XML and JSON in the past are not complicated. It is good to use the LoadRunner built-in function and C function to process it together. The most painful one is to use LoadRunner to implement the Web/HTTP protocol + Windows Sockets protocol + MySQL + memcached script writing, and those who understand LoadRunner should be able to understand. Although the built-in C compiler can use C ++ extensions, the usage is not exactly the same and there are many traps. Java vuser is not as comfortable as Java development.

Today, I can't stand parsing the huge JSON string returned by the server with the char of the C statement! I can't bear it anymore.

Parse JSON strings is still the most convenient way to use Java. If you can use eclipse to compile the LoadRunner script, it's just like the vs plug-in of LoadRunner.

The method is simple:

1. Use eclipse to create a Java Project

2. Import the "% loadrunner_home % \ Classes \ lrapi" directory to the project.

3. Export the project as a jar package. For example, name it lrapi. jar.

4. When creating a Java project, introduce lrapi. jar to the extension library.

5. "Import lrapi. lr;" you can use the LoadRunner function.

6. "Import lrapi. Web;" can use LoadRunner's Web function.

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.