分布式系统的功能和性能测试框架:Zopkio

jopen 10年前

Zopkio是专为支持大规模的性能和功能测试的一个测试框架。

基本用法

Use the zopkio main script:

zopkio testfile

Zopkio takes several optional arguments:

--test-only [TEST_LIST [TEST_LIST ...]]                        run only the named tests to help debug broken tests  --machine-list [MACHINE_LIST [MACHINE_LIST ...]]                        mapping of logical host names to physical names                        allowing the same test suite to run on different                        hardware, each argument is a pair of logical name and                        physical name separated by a =  --config-overrides [CONFIG_OVERRIDES [CONFIG_OVERRIDES ...]]                        config overrides at execution time, each argument is a                        config with its value separated by a =. This has the                        highest priority of all configs  --output-dir OUTPUT_DIR                        Specify the output directory for logs and test results.                        By default, Zopkio will write to the current directory.

Alternatively you can import zopkio in your code and run specific tests:

from zopkio.testrunner import TestRunner  test_runner = TestRunner(testfile, tests, config_overrides)  test_runner.run()

利用 Zopkio 进行测试

Zopkio provides the ability to write tests that combine performance and functional testing across a distributed service or services. Writing tests using Zopkio should be nearly as simple as writing tests in xUnit or Nose etc. A test suite will consist of a single file specifying four required pieces:

  1. A deployment file
  2. One or more test files
  3. A dynamic configuration file
  4. A config directory

For simplicity in the first iteratation this is assumed to be json or a python file with a dictionary called test.

项目主页:http://www.open-open.com/lib/view/home/1418345550027