A test framework for mobile, web and server integration test, the old version is created by mzxu, refactored by myself.
python setup.py install
>>chorussetup chorusproject
>>cd chorusproject
>>chorusrun
>>chorusmodify -c default.cfg -s MYENV -k Scope -v Sanity,Regression
will change default.cfg file MYENV section key Scope value to "Sanity,Regression"
>>assertBool(name, content, levels)
>>assertData(name, content, levels)
>>assertDataOnFly(name, data1, data2, levels, cptype)
>>assertHTTPResponse(name, response, levels, logic)
>>assertImageData(name, imagedata, levels, image_logic, imagetype)
>>assertScreenShot(name, driver, levels, image_logic, imagetype, elements, coordinates)
>>assertText(name, content, levels, logic)
chorusrun --color
It will give a colorful logs in command line, based on different log level.
chorusrun -e MYENV
It will reload the environment to MYENV, and related keys in MYENV section will be reloaded in configinfo
-
You may use
from ChorusCore import ChorusGlobals
to load global variables -
You may modify chorusrun.py to redesign the project preparation
-
You may use
from ChorusCore import Utils
to import some common useful functions -
ChorusCore.APIManagement and ChorusCore.DBOperation will provide HTTPAPI and MySQL basic functions support
-
You may create Performance report by below lines:
>>from ChorusCore.PerformanceManagement import Performance_Result
>>Performance_Result.add(name, status, detail, time_taken)
If there Performance_Result.data is not empty, then it will generate Performance.html in the Output folder
8.. You may generate your own log file by below lines:
>>from ChorusCore.ProjectConfiguration import ProjectConfiguration
>>from ChorusCore.LogServer import Level
>>proj = ProjectConfiguration()
>>proj.set_logserver(level=Level.debug)
>>proj.logserver.add_filehandler(level=Level.error, filepath = <filepath>, filename = "error.log")