Skip to main content

X automated test platform command line client

Project description

X ATP CLI Client

X automated test platform command line client

Sweetest of X ATP

X Sweetest is a secondary development project for Sweetest according to the Mozilla Public License Version 2.0 agreement.

Open a Cmd or Shell command window and go to the directory, for example: D:\Autotest, enter following command for a quick experience.

x-atp-cli -d
cd x_sweetest_example

If you have used Sweetest before, just remove from sweetest import Autotest and add from x_sweetest import Autotest to switch to X Sweetest. for example:

# from sweetest import Autotest
from x_sweetest import Autotest
import sys

v0.1.6 change

Change content in keywords/ file to resolve issue that the Output Data field does not support [{'id':1},{'id':2}] format Json return value.

        elif v == 'text':
            g.var[k] = response['text']
  '%s: %s' % (k, repr(g.var[k])))
        elif k == 'json':
            sub_str = output.get('json', '{}')
            if sub_str[0] == '[':
                index = sub_str.split(']')[0][1:]
                sub = json2dict(sub_str[len(index)+2:])
                result = check(sub, response['json'][int(index)])
                sub = json2dict(output.get('json', '{}'))
                result = check(sub, response['json'])
            #'Compare json result: %s' % result)
            var = dict(var, **result['var'])
            g.var = dict(g.var, **result['var'])
  'json var: %s' % (repr(result['var'])))

An example of editing the Output Data field of -TestCase.xlsx is as follows:

  • json=[0]{'id':'<id1>'}
  • json=[-1]{'id':'<id2>'}

v0.1.7 change

Change the content in the keywords/ file, add form usage in Test Data to optimize the writing format of the import file function in the -TestCase.xlsx field.

    if kw == 'get':
        r = getattr(http.r, kw)(http.baseurl + url,
                                params=_data['params'], timeout=timeout, **data)
        if _data['params']:
  'PARAMS: {_data["params"]}')

    elif kw == 'post':
        if 'form' in data:
            form_dict = json2dict(data['form'])
                if len(form_dict) == 1:
                    for form_k, form_v in form_dict.items():
                        form_name = form_k.split("/")[-1]
                form_data = MultipartEncoder(fields={'file': (form_name, open(form_k, 'rb'), form_v)})
                form_headers = {'Content-Type': form_data.content_type}
                r = getattr(http.r, kw)(http.baseurl + url, data=form_data, timeout=timeout)
                logger.exception("***form can be only one Key-value***")
            r = getattr(http.r, kw)(http.baseurl + url,
                                    data=_data['data'], json=_data['json'], files=_data['files'], timeout=timeout, **data)'BODY: {r.request.body}')

    elif kw in ('put', 'patch'):
        r = getattr(http.r, kw)(http.baseurl + url,
                                data=_data['data'], timeout=timeout, **data)'BODY: {r.request.body}')

An example of editing the Test Data field of -TestCase.xlsx is as follows:

  • form={r'./files/test.xls': 'application/'}
  • form={r'./files/': 'application/zip}

Project details

Download files

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

Files for x-atp-cli, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size x-atp-cli-0.1.8.tar.gz (120.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page