====
github.com/progorker =_============
_ __ _ _ ___ __ _ ___ _ _| |_____ _ _
| '_ \ '_/ _ \/ _` / _ \ '_| / / -_) '_|
| .__/_| \___/\__, \___/_| |_\_\___|_|
=|_|===========|___/======================
API References of pyTestor
----- oOo -----
[procedure] api_testor_success
==========================================
-------|__/-------------------------
SYNTAX
------------------------------------
def pytestor.api_testor_success( p_token, p_suite_id, p_page_no, p_beauty = False ):
# return p_results
-------|__/-------------------------
USAGE
------------------------------------
$)
import sys
import os
t_testor_dir = '../pyTestor'
sys.path.append( os.path.abspath( t_testor_dir ) )
import pytestor
username = 'mytestor'
password = 'rzutomqahegpnyx'
token = pytestor.api_testor_login( username, password )
print( "\nToken: " + token + "\n" )
suite_code = 'pyTestorTrial'
suite_id = pytestor.api_testor_suite( token, suite_code )
print( "\nSuite ID: " + str(suite_id) + "\n" )
pytestor.api_testor_clean( token, suite_id )
case_code = 'test_numbers'
case_id = pytestor.api_testor_case( token, suite_id, case_code )
print( "\nCase ID: " + str(case_id) + "\n" )
test_code = 'greater_than.1'
dbl_a = 20.3
dbl_b = 18.2
test_id = pytestor.api_testor_greater_than( token, suite_id, case_id, test_code, dbl_a, dbl_b )
print( "\nTest ID: " + str(test_id) + "\n" )
beauty = False
results = pytestor.api_testor_finish( token, suite_id, beauty )
print( "\n===== Results: Finished =====\n" + str(results) + "\n" )
page_no = 1
beauty = False
results = pytestor.api_testor_success( token, suite_id, page_no, beauty )
print( "\n===== Results: Success =====\n" + str(results) + "\n" )
----------------------------
Token: a6c50e6ebffabe79852cd41e281a884d
Suite ID: 1
Case ID: 22
Test ID: 20
===== Results: Finished =====
+---------+--------+---------------+----+---------------+--------------+------------+------------+
| version | status | code | id | success_count | failed_count | test_count | case_count |
+---------+--------+---------------+----+---------------+--------------+------------+------------+
| 17 | GREEN | pyTestorTrial | 1 | 1 | 0 | 1 | 1 |
+---------+--------+---------------+----+---------------+--------------+------------+------------+
+------------------------------------------+-----------------------------------------------+
| To re-print: | To get source file of [a] test case: |
+------------------------------------------+-----------------------------------------------+
| $) call api_testor_result('_token_', 1); | $) call api_testor_source('_token_', 1, 'a'); |
+------------------------------------------+-----------------------------------------------+
===== Results: Success =====
+--------------+----------------+---------------------------------------------------------------------------------+
| case | test | message |
+--------------+----------------+---------------------------------------------------------------------------------+
| test_numbers | greater_than.1 | [greater_than.1] test (greater_than) is success. \nOperand: 20.3\nValue: 18.2\n |
+--------------+----------------+---------------------------------------------------------------------------------+
----------------------------