Changelogs » Ngta

Ngta

4.2.9

1. Change some arguments into multi-lines.
2. Update doc location to readthedocs.
3. Simply process name in log.
4. Add `_node_` attribute for module and class.
5. Provide additional kwargs for ngta.ext.http.bench.TestBench.
6. Add is_busy attribute for AmqpTestConsumer.

4.2.8

1. Import Mapping and Iterable from collections.abc instead of collections.
2. Change agent default port to 7070.
3. Change ngta-agent linux service file to /etc/systemd/system.
4. Add .readthedocs.yml.
5. Return http 404 if there is no repo for /api/repo.

4.2.7

1. Add compare debug log for is_equal_to.
2. Fix bug: log traceback failed when exiting soft_assertions.

4.2.6

1. YAML `<testcase>` node support repeat-number.

4.2.5

1. Make errors more precisely.
2. Add more type annotations.
3. Fix bug: Some functions' locations are changed.
4. Add more type annotations.
5. Add more type annotations.
6. Replace type annotations -> None to -> NoReturn.

4.2.4

1. Export more classes and functions.
2. Add more comments.
3. Rename TestReport argument extras to props.
4. Rename TestProgram name.

4.2.3

1. Check node tag before iter its sub node name.
2. Modify testcase log name style.
3. Remove extra properties from TestResult.
4. Remove TestResultShelveInterceptor.
5. Save testbench dict into result.json in TestResultJsonInterceptor.
6. Support config result in yaml.
7. Define const CALLEE_KEY="()".
8. Update yaml sample config.
9. ErrorInfo support init with str.
10. Set TestBench, TestResult, TestCaseResultRecord, TestSuiteResultRecord, CheckPoint inherit from DictSerializable.
11. Move serialize related functions or classes to serializer.py.

4.2.2

1. Support construct instance when parsing agent and bench yaml config in ngta.agent.
2. Fix bug: Dump json failed if testcase args have annotation.
2. Remove useless interceptor.

4.2.1

1. Add more variables into constants.
2. Move !object:new and !object:locate from loader to config.
3. Construct instance when parsing yaml instead of ConfigFile.get_runners().

4.2.0

1. Add log_dir and log_name annotation for TestCase.
2. Mark merge_result not implemented.
3. Fix json schema for yml <report> node.
4. Fix bug when record error is string.
5. Change yaml <report> node format.
6. Merge !object:invoke into !object.new.
7. Support construct instance by () recursively if not specified !object:new.

4.1.8

1. Change default log format.
2. Add logger name truncate if log format include %(name)s. ye.yang 2019/7/26 13:15
3. Add FIXME note for TestCase.run().
4. Rename argument class_ to clazz.

4.1.7

Fix bug: Don't save execution history into .cache file.
Update coupling version greater than and equal than 1.1.0.

4.1.6

1. Move cache from .ngta to .cache.
2. Update jsonschema version greater than or equal than 3.0.1.
3. json schema validate for simple yaml config.
4. Remove useless dependency.

4.1.4

1. parametrize support kwargs to generate data by cartesian product.
2. support json dump enum and unknown types.

4.1.3

1. Fix bug: when loading <testcase> and <cls-loader>, and not provide params, it can't load data from parameterize.
2. Default display parameters in test report.

4.1.2

1. yaml config node iterations support 2d-array.
2. add html block for testcase record extras.
3. log exception when running program.

4.1.1

1. Move log_name and log_handler to testcase level, otherwise when calling another testcase in testcase, it will release log handler failed.

4.1.0

1. Remove yaml config root node <config>
2. Support simply yaml config without <runner> and <context>
3. Remove fail-freeze feature, use listener on_testcase_failed instead of.
4. Rename yaml tag !object to !object:new.
5. Add yaml tag !object:invoke to call function.
6. Add yaml tag !object:locate to locate a object.

4.0.0

1. Move code in resource.py to resources folder.
2. Don't init etcd if there are no test benches.
3. Add a new api to get git repo info.
4. Remove api to get git commits.
5. When collect relevant call traceback, check testcase in work dir instead of `__traceback_hidden__`.
6. Remove useless sub parser.
7. No longer support xml config file.
8. Remove xml related document.
9. Change agent testbench config from xml to yml.
10. Change --includes, --excludes, and --tags to nargs format.
11. Provide error when calling result.add_failure method.
12. Change python requires to >=3.6.5.
13. Support rerun failed test cases from result.json.
14. Add document for yaml config.
15. Fix bug when run with multi processes.
16. Rename routing to route

3.2.5

1. Add assert_warn function.
2. Add assert_warn method for TestCase.
3. Add more unit tests.
4. Move record related code from TestResult to TestCase.
5. Add agent.service for systemd.
6. python -m ngta.agent support install service on windows and linux.

3.2.4

1. Add testbench property for TestCase.
2. Fix bug when upgrade pyyaml to latest version.
3. Fix bug when running http api testcase.

3.2.3

1. Use pypika instead of SqlQueryBuilder.
2. Add inspector for SqlAlchemyHelper.
3. Truncate assert message.
4. Don't check headers and text rule if not defined.
5. Don't convert json result to user defined list and dict.
6. Remove !exec.function.
7. Change rule as test method argument instead of constructor argument.
8. Make sure path of <api-loader> should be file or dir.

3.2.2

1. Add requirement records https://pypi.org/project/records/.
2. Refactor database related code according to records library.
3. Add build.py for building docs with multiple languages.
4. Update travis.yml for generating docs.
5. Support version and language in doc.
6. Fix bug for assert_raises.
7. Change some private methods to protected methods.
8. Fix bug for rename testcase's methods.
9. Rename run_all_tests.py to run_tests.py.
10. When dump json for TestCaseResultRecord, should handle error is None.

3.2.0

1. Add constants for some dirs' base name.
2. Format code with PEP8.
3. Change case_dir to cases_dir for more accurate.
4. Add sphinx docs.
5. Add more comments.
6. Add deploy key for deploying automatically by travis.

3.1.8

1. Change github url.
2. Modify duration type from str to float.

3.1.7

1. Fix bug of LocateTestProgram.
2. Add attribute 'extras' for TestRecord.
3. Remove casting argument from `SqlAlchemyHelper.__init__`.

3.1.6

* Fix bug when getting value from etcd3 is None.
* Format code with PEP8.
* Add testcase list http restful api.
* Add LRU cache for /api/testcases and /api/testhierarchy.

3.1.5

* Update API test yaml sample.
* Add git related content for work dir in README.
* Format code with PEP8.
* Add node property for TestBench.
* Add bench info for TestRecord.
* Store testbenches as list into ETCD3.
* Add Http interface to get git commit logs.

3.1.4

* Handle test method starts with prefix test of TestCase.
* Support define tests as dict or list in config yaml when testing API.
* Agent: Add type for each node of get_hierarchy_by_module()
* Agent: Fix bug when get hierarchy with specified commit.
* Agent: Always reload module when get hierarchy.

3.1.3

* Add timezone for datetime string.
* Use etcd3-py instead of python-etcd3 because python-etcd3 will cause exception after http request.
* Add data attribute for TestCase.as_dict()
* Fix bug: name is always null in result of TestCase.as_dict()
* Don't auto delete amqp queue.

3.1.2

* Rename start_time to started_at, finish_time to stopped_at for TestResult and TestCaseResultRecord.
* Fix bug when init project.

3.1.1

* Use etcd instead of zookeeper.
* Use python-etcd3 instead of etcd3-py.
* Fix bug when consume test from RabbitMQ.
* Use absolute path instead of relative path when store log names in TestCaseResultRecord.

3.0.0

* Refactor agent code:
1. Remove requirement: sqlalchemy.
2. Only support consume tests from RabbitMQ.
3. Remove redundant workers.
* Remove setup_testbench function.
* Move AMQP related code to agent package.
* Add default params `__config__`, `__work_dir__`, `__output_dir__`, `__logs_dir__`, `__logs_dir___`.
* Replace pydoc.locate to locate.

2.5.18

* QueryResult.extract support callback.
* Implement filter and casting for QueryResult.

2.5.17

* Update Diff class.

2.5.16

* `<testsuite>` element support class attribute to specify the class path.
* Add get_status_name() method for TestCaseResultRecord.
* Change Http requests style in html report.

2.5.15

* Still compare list and dict if its type not matched.

2.5.14

* Update architecture.mdj, please open it by StartUML.
* Fix bug which can't find target http request.
* Currently don's use deepdiff to implement is_equal_to.

2.5.13

* Always print diff log.
* When using is_equal_to, accept kwargs and assign it to deepdiff.

2.5.12

Move diff log before raise exception.

2.5.11

* Move traceback block into <pre> in html report.
* Change is_equal_to method to use deepdiff library.

2.5.10

* Support display multiple http requests in html report.

2.5.9

* Don't call TestResultShelveInterceptor by default.
* Fix bug for function get_module_name_safely.
* Change resp.json() return dict type from AttrDict to AttrOrderedDict.

2.5.8

* Add operation which used to exec when testcase start and undo when testcase stop.
* Change inspect.getargspec to inspect.signature.

2.5.7

* Fix bug: check exc_info's value before print track traces.
* Remove useless code in suite.py

2.5.6

* Add web ui test package.
* Remove assert_soft.

2.5.5

* Fix bug: main() function can't load test from python file or dir, if its dir not same with current work dir.
* Update default argument in database.py.

2.5.4

* Store compares into checkpoint.record
* Refactor sql and cypher query result object.
* Add more type hints.

2.5.3

* Change DB helpers type from `AttrOrderedDict` to `Helpers`.
* Remove `db_helper` property from `api.http.bench.TestBench`.
* Add `testbench` property for `api.http.case.TestCase`.

2.5.2

* Fix bug: when there are multiple http request in on testcase, it display wrong request in test report.
* Enhance default assert message.
* Truncate traceback line and  length greater than 255 in html report.
* HelperFactory support register helper.
* DB helpers support first, one, one_or_none method to find a db helper.

2.5.1

* Fix bug: don't handle args and kwds not defined when using !assert:callback and !exec:function
* Add DatabaseHelperFactory.

2.5.0

* Fix bug: fix bug if testcase failed and there are no checkpoints.
* Change testcase log name from it real name to its class and method name.
* Add tag !assert, !assert:callback, !exec:function.
* Rename !sql to !exec:sql.
* Move all constants into constants.py.

2.4.6

* Add pre_imports in .ngta file.

2.4.5

* Add validate-schema for <config>

2.4.4

* Fix bug: don't display request and response in html report.
* Fix bug: TestRecord.request.url is empty.
* Display full http url in html report.
* Add default message as checkpoint name if not provide description for AssertionBuilder.

2.4.3

* DB Helper support casting argument.
* DB Helper select result type change from list to ResultList. And its item type changes to AttrOrderedDict.
* requests.Response.json() default return ResultList with AttrOrderedDict.

2.4.2

* Remove postfix of testsuite log.
* Change TestCase, TestSuite and TestRunner's default id from str to UUID object.
* Change !sql:select to !sql.
* Use includes and excludes instead of columns.

2.4.1

* Remove title from TestCaseResultRecord.
* Support more features when configuring yaml for http api test.

2.4.0

* Remove concerns
* Support multi <runner> in xml or yml config.
* Support <include> and <exclude> under <columns> of sql:select in http api yml config.

2.3.3

* Add difflib.ndiff result in log.
* Add casting for !sql:select node in yaml.

2.3.2

* Add enum for http method in yaml api json schema.
* Add more schemas for yaml api config.
* Don't do auto map on database by default.

2.3.1

* Support filter columns in when using !sql:select in YAML API config.
* Add skip in YAML API config.
* Revise YAML API config schema.
* Move http package into api.
* Fix bug of setup.py.

2.2.4

* print sqlalchemy log in console and file.
* Fix bug when executing SelectSQL.
* Store request and response into record in RequestsSession.
* Fix bug when init db_helpers.
* Change 'method' and 'path' not required in api yaml config.
* Re-structure sample.
* The style will be lost when sending report via email, so move table `<thead>` and `<tfoot>` background-color from .css file to html style,
* Fix bug which don't distribute rule.schema.json into python package.

2.2.0

* When using yaml config to test api, support validate by SQL.
* Add a new http api test report style.
* Move http extension from ngta.ext.api to ngta.

2.1.0

* Chart position and default display can be controlled now.
* Add Http API test package.

2.0.5

* Fix bug: check point status is not right when assert_that passed.
* Fix bug: when loading tests in WorkEnv.case_dir, using absolute path to check it.

2.0.4

* Fix bug: there is no finish_time in TestResult.
* Fix bug: should use absolute path when running run_all_tests.py.
* Fix bug: only load tests in WorkEnv.case_dir

2.0.3

* Add more `__traceback_hidden__` for ignore more redundant traceback.
* Fix bug when using soft_assertions.

2.0.2

* Add message default value as empty string.
* Revise some tests.

2.0.1

* Don't compatible with unittest.
* For test method or test function, it should be marked by test.
* Merge class and method as path for <testcase> in xml or yaml config.
* simply parametrize.

1.4.4

* Move dispatch events for ON_TESTMETHOD_STARTED and ON_TESTMETHOD_STOPPED into `TestCase._wrap_testmethod`.
* The log-level and log-layout will be applied in sub-processes.
* Support is_async for TestEventHandler.
* Support generate empty report when running with multi-processes.

1.4.3

* Add events: ON_TESTMETHOD_STARTED, ON_TESTMETHOD_STOPPED

1.4.2

* Rename get_observers to get_event_handlers in TestContext.
* Fix bug when running when multi-processes.
* Set testsuite default name testsuite.
* Fix bug when decode exec_command's stdout in vcs.py.
* Fix bug of sample.listener which define multi-function with same name.
* Support specify testbench in command-line.

1.4.1

* Implement event handler for all fixture: setUp, testDown, setupClass, teardownClass, setUpModule, tearDownModule
* WorkEnv inherit from coupling.pattern.singleton.BaseSingleton
* Fix bug when test is ErrorHolder in result.py.
* Add some testcases for ngta.events.
* Fix bug when calling assertRaises, assertRaisesRegex, assertWarns, assertWarnsRegex, assertLogs

1.4.0

* Remove enum.auto because it only be supported from python3.6.
* Rename <listeners> to <event-observable> in xml config.
* Rename <listener> to <observer> in xml config.
* Add event-observable node in yml config.
* Fix bug when discover testcases from dir.
* Refactor event mechanism.

1.3.0

* When define class, don't inherit from object.
* Rename BaseTestBench to TestBench.
* Rename BaseTestEventHandler to TestEventHandler.
* Add method on_any_event for TestEventHandler.
* Change on_* methods' argument to event in TestEventHandler.
* Move requests package from install_requires to tests_require in setup.py.

1.2.1

* Add more help for command-line.
* Add event.listen to register callback function or listener instance.
* Add decorator event.listen_for to register callback function, listener instance or listener class.

1.1.1

* Fix bug when store json into database.

1.1.0

* Add argument 'testbench' for main() function.
* main() argument 'locate' support module, class and method.
* Add MARK_ON_TEST_CLASS and MARK_ON_TEST_METHOD class property for decorator.
* Remove setup_testbench.

1.0.3

* Add `__str__`, `uid`, `name` for TestSuite.
* Add `uid` for TestSuite.
* Remove `__enter__` and `__exit__` for TestBench and SetupTestBenchMark.
* Add type hints for mark.py.

1.0.2

* For matching python require version, change super(C, self) to super().
* Remove TestResultXmlReport.
* Remove `_ts_records_` from base.html when generating html report.
* Change logger.warn to logger.warning.
* Change log file basename format.

1.0.1

* Fix bug when register runner into container.
* Default enable TestResultShelveInterceptor instead of TestResultXmlInterceptor.

1.0.0

* Rename WithTestBenchMark to SetupTestBenchMark.
* Add type hints.
* Support WorkEvn in ngta.agent.
* Remove package: six.

0.18.4

* Should provide arguments when calling generate_test_from_obj recursively.
* Support with context on setup_testbench.
* Require coupling>=0.8.16.

0.18.3

* Rename with_testbencn to setup_testbench
* Only handle method startswith test in generate_test_from_obj.

0.18.1

* Rename `<pkg-loader>` to `<obj-loader>`.
* Add `with_testbench` marked on TestBench class, so don't need to config testbench in xml or yml config file.
* Support `--locate` and relative arguments in command-line.
* Move `fail-fast`, `fail-freeze`, `process-count`, `disable-defaults-listeners` to root `<config>` element.
* `<obj-loader>` support package, module, class, method, file and dir now.
* Remove `<dir-loader>`.
* Change repeat-foreach default value to False.

0.17.1

* Fix bug: Always retry connect rabbitmq when creating PublishWorker.
* Add third-party package 'watchdog' to support hot patch module.
* Add http request handler for '/api/rest/testcases'.
* Add http request handler for '/api/rest/testcases/(.+)'.
* Refactor code for get_hierarchy_by_module.
* Fix bug: can't publish testcase record to RabbitMQ.
* Fix bug: don't generate task_execute.log and task_publish.log.
* Fix bug: can't construct correct object when using !!python/object in agent.yml.

0.16.6

* TestCaseResultRecord's enable_mock don't updated by testcase.
* Rename prepare_sys_path to prepare_sys_path_for_work_dir in util.py
* When generating html from xml, still need to add cases dir and lib dir into sys.path.
* Fix bug: specify the cases_dir as root lib dir when getting testhierarchy.

0.16.5

* Highlight current showed status and parameters in report.

0.16.4

* Update sample and README.

0.16.3

* Change parametrize default type from str to object.
* Support validate json format with json schema when agent loading tests.

0.16.2

* Merge log_sample.yml into agent_sample.yml.
* Rename SrvSetting -> AgentSetting, ResSetting -> BenchSetting.

0.16.1

* Update tests.
* Rename
* srv.exe to agent.exe
* srv.xml to agent.xml
* srvconf_sample.yml -> agent_sample.yml
* resconf_sample.yml -> bench_sample.yml
* logconf_sample.yml -> log_sample.yml

0.15.4

* Fix bug when rerun inherited from base class.
* Remove useless samples.
* name support callback function without arguments.
* Fix bug when unregister non-exists TestContext.
* Add more tests.

0.15.3

* Add test_mark.py.
* Fix bug when rerun's scope include SETUP or TEARDOWN.

0.15.2

* Fix bug: always skip testcase when using skipif.
* Rename _get_unique_mark to _get_single_mark.

0.15.1

* Add ignore_inherited_methods to ignore inherit test method from base class.
* Add ignore_inherited_marks to ignore inherit marks from base class.
* Remove ignore-inherited from xml and yaml configuration.

0.14.3

* Add block checkpoint_images in base.html.
* Always display checkpoint error if it is not empty.
* Use relative log path in html report.

0.14.2

* Add checkpoint images display in report.html
* Change coupling require greater than v0.8.10.

0.14.1

* Support read cases_dir from .ngta, if not provided, default value is `${WORKDIR}/cases`.
* Change html id 'chart-row' -> 'overview-chart-row', 'chart-div' -> 'overview-chart-div' in report.html.

0.13.13

* Add extras attribute for checkpoint.
* Add images and extras for pass_, warn_, fail_ and all assert methods.

0.13.12

* Change pie chart center to `['88%', '50%']`.
* When draw timeline chart, the scatter points should use middle time.

0.13.11

* Fix bug of find_work_dir function on Python2.7 in Windows.
* Add timeline chart.

0.13.10

* Draw chart only when click "Show Chart".
* Change echarts js to echarts.common.min.js.
* Remove python_requires from setup.py.

0.13.9

* Move code from init/bin/util.py into `__main__.py`.
* Update README.
* Change chart display position.
* Fix bug of total statistics of overview table.

0.13.8

* Change print to logger.debug.
* Change multi-processes run simplify.
* Remove redis require from setup.py.
* Change coupling require greater than v0.8.9.

0.13.7

* When run with multi process, change QueueTestConsumerProcess id index startswith 1.
* Add pie chart in test report.

0.13.6

* Remove useless import and functions.
* Add argument images for TestCase methods: add_checkpoint, pass_, fail_, warn_.
* use signature instead of inspect.getargspec when wrap assert.
* For testcase log, use record.id as postfix.
* Fix bug when running with multiple processes.

0.13.5

* Fix bug: When process killed abnormally, the report can't be generated because the result.start_time and result.finish_time is None.
* Add ${WORKDIR}/bin/cases into sys.path when running init/bin/util.py.
* Add images from TestCase.CheckPoint
* Add TestResultJsonInterceptor.

0.13.3

* When call listener in testsuite and testrunner, don't handle failfast argument.

0.13.2

* Update report base.html

0.13.1

* Add `__main__.py` for agent.
* Default add bin/cases dir into sys.path.
* Remove common.py, cli.py, srv.py and util.py from init dir.
* Add .ngta into init dir for anchor and config.

0.12.8

* Add logs into html report.

0.12.7

* Change `<extra>` not required of `<html>`.
* Rename some html block name.
* TestCase.CheckPoint can ben replaced now.
* Add main function to run testcase simply.
* Add jinja2 block for checkpoints and checkpoint.

0.12.6

* Fix mock import bug when running on Python2.7
* Default enable default listeners even there is no `<context>` configured.

0.12.5

* Add log-level and log-layout for root element `<config>`.
* Change coupling version requirement to v0.8.7

0.12.4

* Add README.rst
* Rename method json() to as_dict()
* Rename mocking to patch, mocking.object to patch

0.12.3

* Change publishing test runner state from dict to TestRunnerPublishingState.
* Remove __json__ from CheckPoint and TestCaseResultRecord.
* Remove jmespath.
* Remove ngta.log.
* Add current_context() for context.py, it is alias of TestContextManager.current_context()
* Fix bug of runner.json schema.

0.12.2

* Update mock sample.
* Update patch and patch.object decorator.

0.12.1

* Add more sample.
* Fix bug for rest api testhierarchy.
* Fix rerun bug when there are no arguments.
* Remove duplicated tags for testcase.
* Add mocking and mocking.object decorator.
* Remove --failfast and --failfreeze from command-line arguments.
* Add attribute enable-mock for `<testcase>` element.

0.11.1

* Change agent config file from srvconf.xml to srvconf.yml.
* Update SvnRepository and GitRepository.
* Add column revision for testrunner table.
* Support 'is_def' when parse testcase parameters json data.
* Change repeat to repeat-number
* Add attribute repeat-foreach for `<cls-loader>`, `<tag-loader>`, `<pkg-loader>`.

0.10.5

* Fix bug: For yaml config, don't handle failfast and failfreeze in command-line
* Fix bug: Pycharm debug not work when provide relative path for TestProgram.
* Fix bug: Change expire_on_commit as False when using sqlalchemy sessionmaker.

0.10.4

* Add long_description from README.md by using pypandoc.
* Remove README.rst
* Fix bug: Don't handle failfast and failfreeze in command-line

0.10.3

* Move pattern attribute into base class ObjLoaderConfig.
* Insert lib dir at index 0 of sys.path.
* Don't overwrite logconf.yml, resconf.xml and srvconf.xml if exists.
* Support <dir-loader> in config file.
* Fix bug: Don't handle extend for <xml-loader> and <yml-loader>
* Using JSON schema to validate yaml config file.

0.10.2

* Update setup.py.
* Update LICENSE.
* Change --output-dir not required in command-line args.
* Don't init vcs-worker if there is not config in srvconf.xml.
* Add prefix 'task_' for all task logs.
* Move logging config into logconf.yml
* Fix bug: Testbench class of sample is incorrect.
* Fix bug: ExecuteWorker object has no attribute 'runners'
* Fix bug: Should get worker interval as float.

0.10.1

* Initial release