Finally found the time to organize the FunTester testing framework tutorial, congratulations, hope you can more support FunTester.

PS: This tutorial is mainly text version, video version depending on the situation recording or live.

Environment set up

Serious promise: The FunTester framework tutorial will cover both Java and Groovy. DCS_FunTester also supports both languages, but is outside the scope of this tutorial.

Java environment

This is too simple to repeat.

Groovy environment

This is optional, but you’d better have it, otherwise you’ll be packaging Groovy dependencies as environment variables and not be able to package them into jars.

  • Download the Groovy3.0.8 ZIP package
  • Unzip it and find a comfortable place to store it
  • Configuring Environment Variables
  • rungroovy -vTest whether the installation is successful

PS: If you can’t find it, or the download is very slow, please reply to Groovy to get the web disk download address, a total of 71M.

There’s a pitfall here. Groovy requires a Java_home configuration in the environment variable, which I’ve encountered once. You can modify your own configuration according to your own error situation.

This is my local configuration, can make a reference:

JAVA_HOME = / Library/Java/JavaVirtualMachines jdk1.8.0 _281. JDK/Contents/Home CLASSPAHT =. : $JAVA_HOME/lib/dt. The jar: $JAVA_HOME/lib/tools. The jar a GROOVY_HOME = / Users/oker/Library/groovy - 3.0.8 GRADLE_HOME = / Users/oker/Library/gradle - 6.8 PATH = $JAVA_HOME/bin: $PATH: the PATH = $GRADLE_HOME/bin: $PATH: PATH = / Users/oker/Library/k6/0.31.1 / bin: $PATH: the PATH = $a GROOVY_HOME/bin: $PATH: export JAVA_HOME export CLASSPATH export PATHCopy the code

Pull FunTester project

Gitee address:

Choose one of the two approaches. If one fails, try the other. Downloading the project ZIP package is not recommended. PS: Note that the branch is oker.

FunTester uses Gradle as a build tool. My local version is 6.8. It is rumored that Intellij will have a version of Gradle by default starting in 2021. If you are building a project for the first time, you will need to download the default version, which can be very slow. This solution is inconvenient to talk about, you can search online.

Run the hello word

Find a comfortable place to create a test class, and remember to create a Groovy class (or Java class). The main method code looks like this:

    public static void main(String[] args) {
         3.times {
            output(it)
        }
    }
Copy the code

If your console outputs the following, this chapter is over!

INFO - > the current user: oker, working directory: / Users/oker/IdeaProjects funtester/system coding format: utf-88, System Mac OS X version:10.16
INFO-> 0
INFO-> 1
INFO-> 2

Process finished with exit code 0

Copy the code

The project structure

The FunTester test framework project structure is shown below. I have commented on the packages and classes that are not used in the Oker branch. ,

Base beans, Java beans, constaint interfaces, config, dB, mongodb, etc. Mysql (mysql) redis (mysql) redis (mysql) Execute () Thread () JsonVerify () JsonVerify () JsonVerify () ResponseVerify (ResponseVerify) based on JsonPath Save (data store method encapsulation) SourceCode (common method encapsulation) HttpClient (HTTP protocol encapsulation) ClientManage (HTTP client encapsulation) FunLibrary (HTTP request response encapsulation) FunRequest GCThread Socket utilsCopy the code

Have Fun ~ Tester!

FunTesterTest framework and distributed test frameworkDCS_FunTesterOfficial account, welcome to follow!


  • A preliminary study of the FunTester test framework architecture diagram
  • The ultimate showdown between K6, Gatling and FunTester!
  • Single-player 120,000 QPS — FunTester revenge
  • FunTester’s past and present life
  • Automate testing in production environment
  • Tips for writing test cases
  • 7 skills to Automate tests
  • Iot testing
  • Why do tests miss bugs
  • Selenium Automation Best Practice Tips (1)
  • Selenium Automation Best Practice Tips (Middle)
  • Selenium Automation Best Practice Tips (Part 2)
  • Asynchronous authentication of Socket interfaces
  • After Selenium 4, no longer meet the API

Click to read for an original collection of FunTester history