Skip to main content

testcube-client

TestCube PyPI Build Updates

A Python client for testcube.

Get Started

You should have python 2.7 or 3.x installed on your machine. Then follow steps here.

Installation

Install testcube-client via pip is the most easy way.

pip install testcube-client -U

Register to Server

You must have a TestCube server deployed at somewhere, then run --register command.:

testcube-client --register http://testcube-server:8000

Upload Run Results

Once you registered to a server, you will have 2 ways to upload test results, first choice is calling --start-run at the beginning and calling --finish--run when finished.:

# call --start-run before run started
testcube-client --start-run -name "nightly run for testcube"  --team Core --product TestCube

# call --finish-run after run finished
 testcube-client --finish-run --xunit-files "**/results/*.xml"

In this way, TestCube will record the exact start_time and end_time for the run. You should provide team and product name when start the run.

Another choice is using --run command to upload test results like a batch.:

# put this command at the end of a run
testcube-client --run -n "smoke tests for testcube" -t XPower -p TestCube -v v1.0 -x "**/smoke*.xml"

With this choice, TestCube will use current time as end_time for the run, and guess start_timeaccording to run duration. team and product name are also required.

Upload Result Files

Sometimes your test will generate result files, for example, screenshots, log files. These files are useful when analyze test failure, so we can upload them to TestCube as well:

# call --result-files to upload files
testcube-client --result-files "**/*.png"

# use -i as a shortcut
testcube-client -i "**/*.jpg"

Note:

In order to link a file to a test result, the file name must contains test case name so that TestCube can map them together.

For example:

test case name => "test_student_login"
result file name => "test_student_login_failed.png"

Command-line Options

The optional arguments:

-h, --help            show this help message and exit
-r REGISTER, --register REGISTER
                      Register to the TestCube server, e.g.
                      http://server:8000
-run, --run           Upload run info at one time, require team,product,name
                      and xunit files.
-start, --start-run   Start a run, require team, product and a name.
-finish, --finish-run
                      Finish a run, require xunit files.
-x XUNIT_FILES, --xunit-files XUNIT_FILES
                      Specify the xunit xml results, e.g "**/result*.xml"
-i RESULT_FILES, --result-files RESULT_FILES
                      Specify the result files, e.g "**/output/**/*.png"
-n NAME, --name NAME  Specify the run name.
-t TEAM, --team TEAM  Specify the team name.
-p PRODUCT, --product PRODUCT
                      Specify the product name.
-v PRODUCT_VERSION, --product-version PRODUCT_VERSION
                      Specify the product version. [Optional]
-f, --force           Force the action, support --register command.
-vb, --verbose        Show verbose log info.

History

0.8.0 (2018-06-03)

  • Fix description page in new pipy site, changed to markdown format.

0.7.8 (2018-02-08)

  • Support clean up runs after specified days, for example:
    • testcube-client --cleanup-runs days 60

0.7.6 (2017-10-31)

  • Support server version v1.3
  • Save environment variables to server when start a run, use for result reset

0.7.0 (2017-10-25)

  • Support server version v1.2
  • Able to handle pending task, for example:
    • testcube-client --handle-task
  • Able to rerun a result by reset id, for example:
    • testcube-client --reset-result 12345 -x "[**]/[*].xml"

0.6.0 (2017-09-07)

  • Able to upload result files using argument --result-files
    • testcube-client --result-files "[**]/[*].png"

0.5.0 (2017-07-07)

  • Update due to testcube model changed, not compatible with prev versions

0.3.3 (2017-06-29)

  • Improve run url in output.
  • Bug fix: run duration data incorrect.
  • Abort run if failed to analyze its xml.
  • Always summarize run duration from test cases.
  • Bug fix: unicode exception message in python 2.
  • Bug fix: multiple cache hits error.

0.2.2 (2017-06-13)

  • Support --force command when register a server.
  • Sum the testsuite time from testcases if there is no time attribute in result xml.
  • Fix document moved header issue when server deployed in IIS server.
  • Add cache to improve performance.
  • Fix import error.

0.1.3 (2017-06-12)

  • Support register to TestCub server.
  • Support --run command.
  • Support --start-run command.
  • Support --finish-run command.

0.1.0 (2017-06-08)

  • First release on PyPI.

Metadata

Release files for testcube-client 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for testcube-client 0.8.1
File Size Uploaded
testcube-client-0.8.1.tar.gz 32.9 kB Details

Release files / testcube-client-0.8.1.tar.gz

Download URL testcube-client-0.8.1.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ee889bc71a35679e6ee69430ee4e4b52e018a915083b0ef594729dbf7537e2eb
BLAKE2b-256 checksum
How to use checksums
fad82c017190a8ffe826fac9309f17f53af1d1ecc95dcf0924bf7072a6bb3a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.8.1 This release

1 release file

0.8.0

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page