Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.75 KB

README.md

File metadata and controls

52 lines (33 loc) · 1.75 KB

gearpump-test-framework

How to run the framework

Make sure scala and sbt are installed, if not, please install them first.

1). Clone the repository

  git clone https://github.com/gearpump/gearpump-test-framework.git
  cd gearpump-test-framework

2). Build package

  ## The target package path: target/gearpump-test-framework-$VERSION.tar.gz
  sbt clean packArchive ## Or use: sbt clean pack-archive

After the build, there will be a package file gearpump-test-framework-${version}.tar.gz generated under target/ folder.

3). Unpack the package file

You need to flatten the .tar.gz file to use it, on Linux, you can

  # please replace ${version} below with actual version used
  tar  -zxvf gearpump-test-framework-${version}.tar.gz

4). Run the framework

To run a suite of tests from the command line, you can use the org.scalatest.tools.Runner Application. The basic form of a Runner invocation is:

  scala [-cp scalatest-<version>.jar:...] org.scalatest.tools.Runner [arguments]

The arguments Runner accepts please check the scalatest doc

For example, on Linux:

  scala -classpath "lib/scalatest_2.11-2.2.4.jar:lib/*" org.scalatest.tools.Runner -R lib/gearpump-linux-test-0.1.jar -f report.log -o

This command will run all the test cases in gearpump-linux-test-0.1.jar, "-R" specifies the runpath and "-f" causes test results to be written to the named file, "-o" causes test results to be written to the standard output. You can also specifies a suite class to run by using "-s".

Please check scalatest doc for more information about the command.