Steps for compiling and running Fitnesse-20140630 and RestFixture-3.1

Source: Internet
Author: User

To allow the RestFixture-3.1 to correctly print test results in the Fitnesse-20140630, prepare to modify restfixture.

1. Download and compile the Fitnesse-20140630

The following steps take compiling on a 64-bit Windows 7 computer as an example. The compiling steps for other platforms such as Linux are similar.

Step 1: Download fitnesse source code

Download the fitnesse source code zip package from the https://github.com/unclebob/fitnesse:

Decompress fitnesse-master.zip:

Step 2: download and install JDK 7u65

There are many tutorials on installing JDK. The following is a brief introduction.

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Jdk-7u65-windows-x64.exe

Install and set environment variables:

?
12 JAVA_HOME=C:\Program Files\Java\jdk1.7.0_65Add content to path:";%JAVA_HOME%\bin;%JAVA_HOME%\..\jre\bin"

Start the command line tool cmd.exe and enter:

?
12 C:\Users\asus>javac -versionjavac 1.7.0_65

The above result indicates that JDK has been correctly installed.

Step 3: download and install ant-1.9.4

Web: http://ant.apache.org/bindownload.cgi

Download apache-ant-1.9.4-bin.zip

Decompress the package to D: \ fitnesse,

Set environment variables:
Ant_home = D: \ fitnesse \ apache-ant-1.9.4
Path: "; % ant_home % \ bin"

Start the command line tool cmd.exe and enter:

?
123 C:\Users\asus>antBuildfile: build.xml does not exist!Build failed

The preceding result indicates that ant has been correctly installed.

Step 4: Compile fitneese source code

Make sure that the computer that compiled fitneese is online, because ant will automatically download various jar packages.

Go to the fitnesss source code directory under the command line and run ant:

?
1234567 D:\fitnesse\fitnesse-master>ant... Print multiple rows... A few minutes laterBUILD SUCCESSFULTotal time: 3 minutes 9 seconds D:\fitnesse\fitnesse-master>
Step 5: Start fitneese in the compiling environment

Go to the fitnesss source code directory under the command line and run ant run:

?
123 D:\fitnesse\fitnesse-master>ant run... Print multiple rows...1Minutes later

Go to the fitnesss source code directory under the command line and run ant:

?
12345678910111213 D:\fitnesse\fitnesse-master>ant... Print multiple rows... A few minutes laterrun:     [java] Configured verbose logging     [java] Loaded custom comparator glob: fitnesse.testsystems.slim.GlobComparator     [java] root page: fitnesse.wiki.fs.FileSystemPage at .\FitNesseRoot     [java] logger: none     [java] authenticator: fitnesse.authentication.PromiscuousAuthenticator     [java] page factory: fitnesse.html.template.PageFactory     [java] page theme: bootstrap     [java] Starting FitNesse on port: 8001     [java] Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework.

The key content for running the print above:

Starting fitnesse on port: 8001Indicates that port 8001 is enabled. Therefore, enter http: // localhost: 8001 in the URL bar of the browser.

Step 6: Use the finesse installation package to start fitneese

The above ant run starts fitneese in the compiling environment.

The installation package generated after fitneese compilation is here:

To start fitneese, see here:

Start the bootstrap-style fitnesse

Step 7: download and install eclipse

Eclipse is an IDE environment developed by Java. It is used to modify Java code and find function definitions later.

Http://www.eclipse.org/downloads/

Because JDK is 64-bit, you must download 64-bit eclipse.

Decompress the package to D: \ fitnesse:

2. Download and compile the RestFixture-3.1 Step 1: Download restfixture source code

Download restfixture-master.zip from https://github.com/smartrics/RestFixture

Decompress the package to D: \ fitnesse.

Step 2: download and install Maven

Http://maven.apache.org/download.cgi download apache-maven-3.2.2-bin.zip

Decompress the package to D: \ fitnesse:

Set environment variables:

M2_home = D :\fitnesse \ apache-maven-3.2.2
Path: "; % m2_home % \ bin"

Start the command line tool cmd.exe and enter:

?
12345678 C:\Users\asus>mvn --versionApache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T21:51:42+08:00)Maven home: D:\fitnesse\apache-maven-3.2.2Java version: 1.7.0_65, vendor: Oracle CorporationJava home: C:\Program Files\Java\jdk1.7.0_65\jreDefault locale: zh_CN, platform encoding: GBKOS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

The above result indicates that Maven has been correctly installed.

Step 3: Compile restfixture

Enter the restfixture source code directory under the command line, and enter the command MVN clean package

?
1234567891011 D:\fitnesse\RestFixture-master>mvn clean package... Many rows[INFO] Building zip: D:\fitnesse\RestFixture-master\target\smartrics-RestFixture-3.1-SNAPSHOT-bin.zip[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 34.981 s[INFO] Finished at: 2014-08-01T06:24:33+08:00[INFO] Final Memory: 24M/123M[INFO] ------------------------------------------------------------------------D:\fitnesse\RestFixture-master>

Build an installation package: smartrics-RestFixture-3.1-SNAPSHOT-bin.zip

Step 4: Run restfixture in the compiling environment

You need to download additional slf4j-simple-1.6.6.jar to the d: \ fitnesse \ restfixture-master directory:

Enter the following test cases under fitnesse:

?
12345678 !define TEST_SYSTEM {slim} !path D:/fitnesse/RestFixture-master/target/dependencies/*!path D:/fitnesse/RestFixture-master/target/smartrics-RestFixture-3.1-SNAPSHOT.jar!path D:/fitnesse/RestFixture-master/slf4j-simple-1.6.6.jar | Table:smartrics.rest.fitnesse.fixture.RestFixture | http://www.w3school.com.cn || GET | /example/xmle/note.xml | 200 | Content-Type: text/xml | //body[text()="Don‘t forget the meeting!"]|

Click test to run the test:

The HTML text is printed directly.

I want the test result to be as follows:

Please follow up on the subsequent blog and I will explain how to modify the source code of restfixture and adjust the JUnit test code:
Customizes restfixture code for Fitnesse-20140630

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.