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.

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"

    new_build(engine_host, pid, build_version, screenshot_directory)

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

usage example

from micooc import build_stats


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

    build_stats(service_host, bid)

test_build_stats()

parameters

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

latestBuildStats

Get the stats of a project's latest build

usage example

const { latestBuildStats } = require("micooc");

async function testLatestBuildStats() {
  const host = "http://localhost:8123";
  const pid = "PID6fb00c63d17f4596ba831a299edd21b4";

  console.log(await latestBuildStats(host, pid));
}

testLatestBuildStats();

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.2.tar.gz (3.7 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.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: micooc-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 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.2.tar.gz
Algorithm Hash digest
SHA256 c1b23cc94a52b8d82393b00b1ef2f9d745af7e2396366c096ec58888108281fa
MD5 d72b08570335c8f41ee9e58536adf4c3
BLAKE2b-256 f699d51f7d2aa38bbf99aaad1d068c80298cb219328f1585a5283936942c28b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: micooc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e93feda2f8863565b1432a42b1b98183834c2ebaf00e4a6be794594e403c12d4
MD5 4094bea48c91326295910b9ed7a77fc6
BLAKE2b-256 cf64b49199ea9d52bfbbb858afd42c655ad988a2f23656d7d4cdea29c84c4661

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