JMeter combining AutoIt operations with Windows programs

Source: Internet
Author: User

Demand:

Controls that simulate the operation of the software, such as dialing and hanging.

1. After downloading and installing the AutoIt, open the Finder tool and use the Finder to navigate to the control on which you want to simulate the operation.

2. In the Finder tool, you can see information about the Control tab. Other controls do similar things

3. Open the Script Editor for AutoIt and write the scripts for the simulation operation control

Dim $dialogTitle = "Microsip" Winactivate ($dialogTitle) winwaitactive ($dialogTitle), 1ControlFocus ("Microsip", "", "[ Class:button;instance:7] Controlclick ("Microsip", "", "[Class:button;instance:7]"), 0ControlFocus (" Microsip "," "," [Class:button;instance:16] ") Sleep (Controlclick) (" Microsip "," "," [Class:button;instance:16] ") Controlfocus ("Microsip", "", "[Class:button;instance:16]") Sleep (Controlclick) ("Microsip", "", "[Class:button;i NSTANCE:16] "), 8ControlFocus (" Microsip "," "," [Class:button;instance:14] ") Sleep (+) Controlclick (" Microsip "," "," " [Class:button;instance:14] "), 6ControlFocus (" Microsip "," "," [Class:button;instance:12] ") Sleep (+) Controlclick ( "Microsip", "", "[Class:button;instance:12]"), 2ControlFocus ("Microsip", "", "[Class:button;instance:8]") Sleep (1000 ) Controlclick ("Microsip", "", "[Class:button;instance:8]") controlfocus ("Microsip", "", "[Class:button;instance:8]" ) Sleep (Controlclick) ("Microsip", "" "," [Class:button;instance:8] ") controlfocus (" Microsip "," "," [Class:buttOn;instance:1] Sleep (Controlclick) ("Microsip", "", "[Class:button;instance:1]") 

  

4. Save as Au3 file, click on Scrit tools->go. Test run, after passing, open AutoIt script to exe tool, the step 3 of the Au3 file to change exe file

5. Open JMeter, add schedule, thread group->beanshell Sampler, add java code calling EXE in BeanShell

Runtime rn = Runtime.getruntime (); Process p = null;try {          p = rn.exec ("\" c:/callout1008622.exe\ "");} catch (Exception e) {System.out.println ("Error exec !");  }

  

6. After saving, start JMeter, run through

JMeter combining AutoIt operations with Windows programs

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.