JFCUnit [transfer]

zhaozj2021-02-12  152

Install JFCUnit

Note: JFCUnit requires some kits

1. JUnit 3.7 (or higher)

2. JAKARTA REGEXP 1.2 (or higher)

Unzip the JFCUnit compressed file to a suitable location. Then add the required JAR file to the classpath (ClassPath).

UNIX:

ClassPath = $ classpath: /path-to-junit/junit.jar: /path-to-jfcunit/jfcunit.jar: /path-to-jakarta_regexp/jakarta-regEXP-1.2.jar

Export ClassPath

Windows:

Set classpath =% classpath%; / path-to-junit / junit.jar; /PATH-TO-JFCUNIT/JFCUNIT.jar; /PATH-TO-JAKARTA_REGEXP/JAKARTA-REGEXP-1.2.jar

Everything is ready.

Install Eclipse plugin

If you are using Eclipse, you can use JFCUnit's Eclipse plugin.

Download plugin file package, extract to / plugins directory, keep

The directory structure is consistent with the compressed file. Restart Eclipse, automatically detect

To the JFCUnit plugin.

Install JBuilder plugin

If you are using Borland's JBuilder, you can install JFCUnit

JBuilder plugin. Download the plugin and extract it to the jbuilderx / lib directory, and

Keep the same structure as the directory structure in the compressed file. Open the project properties page and select the path (PATH)

label. Select the Required Library tab. Add a JFCUnit library and

Click OK (OK). Exit the dialog, you can now write JFCUnit test.

Use JFCUnit recording

JFCUnit saves manpower

A common problem when defining test cases is to write test cases and identify the simulated complex use case.

Human resources required for sequences. JFCUnit provides JFCEventManager API to assist in reducing this issue

Burden brought. "Record" and "Save" are available in the 2.0XML tag (TAG). JfceventManager

It is a control engine, contrast, and filtered AWT event (Event) to the JFCUnit event data structure. Incident

The instrument is linked to the AWTEVENTQUEUE as a listener. From the event queue, it makes it

Events directly through the keyboard, the mouse input AWT event and events submitted by the Testhelper method for JFCUnit

Event data structure associated with JFCUnit. These data structures are then passed to registration in JFCEventma-

Nager's listener.

Another convenient feature of another JFCEventManager is that he can report things through the AWT event queue.

Part. This makes the test developer can inspect in the GUI inside the GUI when a detailed use case is executed.

What is it.

Recording through XML

It is easy to use by XML recording. This includes adding and label to XML files

in. The test case will be executed until the Record element is encountered. Then test the developer

Record new inputs. These inputs will be prevented from in front of the Record element. Recording will continue until

Ctrl-d is pressed. After Ctrl-D is pressed, the script will continue, know the next RECORD

Label or Save label. The tag is used to output a new XML file.

Example running JFCUnit

SlovenBoy Reserved / Publishing: SlovenBoy ◎ Yahoo. COM. CN link: bonoy qa-http://www.bonoy.com

Link: SlovenBoy's Blog -

http://slovenboy.blogdriver.com

Refer to the article "Install JFCUnit".

My installation process

Download the required library file and extract to the appropriate directory

Library file location:

F: / SoftWares> DIR /BAPACHE-ANT-1.6.1Jakarta-Regexp-1.3junit3.8.1xalan-j_2_6_0

Download the desired library file, pay attention to the package of Xalan-J to download a single JAR file.

Modify setClassPath.bat.example file

Open this document and save it as setclasspath.bat. You can save any names.

This file is used to set the system environment variable, when using JFCUnit, if

Is a newly opened command line window (Windows) or re-landable system (un * x)

Need this file from the new. If you are using a UN * X environment, this file needs to be done.

Some modifications. The following is Windows as an example.

SET ANT_HOME = f: /softwares/apache-ant-1.6.1 set java_home = f: /j2sdk1.4.2_04 set junit_home = f: /softwares/junit3.8.1 set xalan_home = f: / softwares / xalan-j_2_6_0 remote checkstyle_home = F: /softwares/checkstyle-2.4 set jakarta_regexp_home = f: /softwares/jakarta-regExp-1.3 set classpath = set classpath =% classpath%;% xalan_home% / bin / xerceptimpl.jar;% xalan_home% / bin / xml- Apis.jar;% xalan_home% / bin / xalan.jar set classpath =% classpath%;% junit_home% / junit.jar set classpath =% classpath%;% jakarta_regexp_home% / jakarta-regexp-1.2.jar set classpath =% ClassPath %; Swingset.jar; dnd.jar Rem, DND.jar Rem, is used by the building java12_home = f: /softwares/jdk1.2.2 set java13_home = f: /softwares/jdk1.3.1 set java14_home = f: / SoftWares / JDK1.4.1

Example running JFCUnit

First execute runexamples.bat to see its parameters.

"Usage: Runexamples.bat [S | D | M | XC | XR | XP | F | N]"

转载请注明原文地址:https://www.9cbs.com/read-6955.html

New Post(0)