Skip to main content

Micoo client for python

Project description

Miccoc

The Python client library for Micoo. This library provide below functions:

  • new_build
  • build_stats
  • latest_build_stats

newBuild

Upload screenshots to and trigger visual test build in Micoo. Return a dictionary of the new created build's bid and build_index.

usage example:

from micooc import new_build


def test_new_build():
    service_host = "http://localhost:8123"
    engine_host = service_host + "/engine"
    pid = "PIDa8e3c0a4444a4f1a90a4dad8bd3467c2"

    build_version = "5fafc0478af24af2da45fa19ddd06c17dd5d0d45"
    screenshot_directory = "./screenshots"

    return new_build(engine_host, pid, build_version, screenshot_directory)

# e.g. {'pid': 'PIDa8e3c0a4444a4f1a90a4dad8bd3467c2', 'bid': 'BID6fb9951c512c478aa891e1ce3e73ecca', 'build_index': 22}
test_new_build() 

parameters

  • host - the Micoo's base URL plus /engine,
  • pid - your Micoo project's PID, it can be found from the Micoo project page's URL,
  • build_version - this build version is neither parts of Micoo, nor your UI automation test, it needs to be the version of you SUT application, most of the case, it's the git revision number. buildVersion is a useful setup of mappings between your visual tests and the SUT application. Anyway, technically, it's just a string which will be displayed in Micoo's project board, you can use anything which is meaningful to you.
  • screenshot_directory - the directory where contains all screenshots to be uploaded, only .png file will be uploaded. All the uploaded screenshot filename becomes the test case name, so there are some restriction to the filename, it must shorter than 100 letters and match [a-zA-Z0-9-_&()#].

About build_version

build_version comes from the SUT application Version Control System, e.g. GIT, SVN, and they are probably differentiate from different test builds, especially when integrate the visual test in CI, so, a more valid usage is to pass its value from environment variable

build_stats

Get the stats of a specific build. Return a dictionary of the specific build's status and result.

usage example

from micooc import build_stats


def test_build_stats():
    service_host = "http://localhost:8123"
    bid = "BIDfb1c90b110124e10a280d5ac5fc9cd20"

    build_stats(service_host, bid)

# e.g. {'status': 'completed', 'result': 'passed'}
test_build_stats()

parameters

  • host - the Micoo's base URL,
  • bid - the Micoo build's bid, once you use new_build to create a new build, its bid will be returned in the response.

latest_build_status

Get the stats of a project's latest build. Return a dictionary of the latest build's bid, index, status and result.

usage example

from micooc import latest_build_stats


def test_latest_build_stats():
    service_host = "http://localhost:8123"
    pid = "PIDa8e3c0a4444a4f1a90a4dad8bd3467c2"

    return latest_build_stats(service_host, pid)

# e.g. {'bid': 'BID6fb9951c512c478aa891e1ce3e73ecca', 'index': 22, 'status': 'processing', 'result': 'undetermined'}
test_latest_build_stats()

parameters

  • host - the Micoo's base URL,
  • pid - the Micoo project's PID, it can be found from the Micoo project page's URL,

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micooc-0.1.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micooc-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file micooc-0.1.3.tar.gz.

File metadata

  • Download URL: micooc-0.1.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

File hashes

Hashes for micooc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 56500236be65a6a93816f086b8c455a8c5f0d2fd208c9b8c251a7458f1a3e436
MD5 e7c1d5b7c496f3f020670c9673da0d08
BLAKE2b-256 1f1a82c452897e6588e84f2b01fb98a88d3743cafbe187dc59013cdae3d55e7a

See more details on using hashes here.

File details

Details for the file micooc-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: micooc-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

File hashes

Hashes for micooc-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2096b477d9d0236923834839fc6a08bd356ff4a87967c9f527c49e5c36ad389a
MD5 6cd6181a248554edc520e581835d473a
BLAKE2b-256 1ef2f5023150ffdf704712ed1b579abd5c02ed74ea84e0ec5ceb5f667df2cd33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page