aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_framework.erl
AgeCommit message (Collapse)Author
2017-09-15common_test: Do not use deprecated functions in string(3)Siri Hansen
2017-06-16[ct] Print unicode atoms and strings correctly in common_test logsSiri Hansen
And use correct encoding when printing to files.
2017-05-04Update copyright yearRaimo Niskanen
2017-02-20[ct] Remove excessive skipped/failed tag in hook functionSiri Hansen
When skipping or failing in a configuration function, the configuration function itself would get {auto_skipped,Reason}, {skipped,Reason} or {failed,Reason} in the hook callbacks on_tc_skip or on_tc_fail. The other test cases that were skipped as a result of this would only get Reason in the hook callbacks. This is now corrected.
2017-02-20[ct] Send tc_start event on force_stop and failed sequenceSiri Hansen
If test cases were skipped because of option {force_stop,skip_rest} or because of a failed sequence, then no tc_start event would be sent, only only tc_done. This is now corrected.
2017-02-20[ct] Fix faulty hook callbacks for skipped testsSiri Hansen
The following bugs are corrected: * Tests that were skipped before calling pre_init_per_* got faulty calls to the corresponding post_init_per_*. E.g. if a test was skipped because suite/0 returned a 'require' statement that was not fulfilled, then post_init_per_suite would be called, even though pre_init_per_suite and init_per_suite were not called. * Tests that were skipped before or in init_per_testcase got faulty calls to pre_end_per_testcase and post_end_per_testcase (end_per_testcase is not called in these situations). Test are added to make sure that the expected callbacks, and only those, are called when tests are skipped in different ways. Conflicts: lib/common_test/test/ct_hooks_SUITE.erl
2016-10-24Fix problem with printouts to incorrect parent group leaderPeter Andersson
2016-06-07ct_framework: Fix unmatched_return warningsZandra
2016-03-15update copyright-yearHenrik Nord
2016-03-09Merge branch 'peppe/common_test/html_improvements' into maintPeter Andersson
* peppe/common_test/html_improvements: Fix problems with formatted test_server printouts Make sure special characters are escaped in e.g. pal and log printouts Conflicts: lib/test_server/src/test_server.erl
2016-03-08Merge branch 'peppe/common_test/cth_improvements' into maintPeter Andersson
* peppe/common_test/cth_improvements: Add missing internal hook functions Fix remaining issues Update ct_hooks test suites Introduce new CT hook functions OTP-13242
2016-03-08Make sure special characters are escaped in e.g. pal and log printoutsPeter Andersson
2016-03-03Fix remaining issuesPeter Andersson
2016-03-01Set dir for slave node's erl_crash.dumpSiri Hansen
This was earlier filename:dirname(code:which(test_server)). On Microsoft Windows, this pointed to a directory under c:/Program Files, and in later versions this directory is no longer writable. The framework (common_test) log dir is now used instead.
2016-03-01Introduce new CT hook functionsPeter Andersson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-04Merge remote-tracking branch ↵Peter Andersson
'origin/peppe/common_test/improve_suite_error_reports' * origin/peppe/common_test/improve_suite_error_reports: Add missing events and hook function calls Improve error reports in log when suite compilation fails OTP-10816
2015-04-17Add missing events and hook function callsPeter Andersson
2015-04-15Update handling of failing all/0 function in test suitesPeter Andersson
2015-04-15Introduce test categories for OTP testsPeter Andersson
2015-04-13Fix problem with suite compilation failures not being correctly reportedPeter Andersson
Also do some minor logging improvements
2015-03-18Always report ok to event handlers after successful cfg or tc funcPeter Andersson
Also make sure test_server never reports failures that can be mistaken for positive results.
2015-02-16Make it possible to print in the test case log from on_tc_* hook funcsPeter Andersson
OTP-12468
2014-06-05Improve cover analysis via common_testSiri Hansen
This addresses several bugs in common_test (ct) when using the cover analysis mechanism: In a ct test run, one can give a cover spec file which indicates that cover analysis shall be run, including a number of modules and a number of nodes. During the ct test run, multiple jobs may be started in test_server, and when the cover option is used, test_server would cover compile and analyse all given modules for each job. This commit instead allows the compilation and analysis to be explicitly ordered by ct for each test run. This way each module will only be cover compiled and analysed once. The cover log will be located in the common_test log directory (ct_run.<timestamp>), and the "Coverage log" link in each suite.log.html will point to this file. A new button is also added in the top level ct index file, which points to the cover log. This change also reduces the need of using the 'export' and 'import' options, since there is no longer any need to accumulate cover data over multiple test_server jobs. However, these options may still be used for importing and exporting cover data in order to store or accumulate data from multiple ct test runs. The 'nodes' option was earlier only used by ct to start cover on the given nodes before starting the first test_server job. After this job was completed, test_server would stop cover completely and then start it again for the next job without any knowledge of the 'nodes' options. For the next test_server jobs cover would therefore no longer be running on these nodes. Explcit calls to ct_cover:add_nodes had to be done in order to collect data through all test_server jobs. This bug has now been solved, since cover is no longer stopped between each test_server job. Finally, ct no longer stores cover data using ct_util:set_testdata. This was earlier used by ct_cover:add_nodes to make sure no node was added twice.This did, however, cause some problems when ct and cover were out of sync. ct could belive that a node was running cover and thus reject adding this node, while in reality cover had been stopped on the node (e.g. by test_server) so no cover data was collected. ct_cover:add_nodes will now instead use cover:which_nodes to check if a node is already running.
2014-04-30Fix problem with comments getting lost when running parallel test casesPeter Andersson
OTP-11898
2014-04-02Document changes in the CT hooks API and the event message protocolPeter Andersson
OTP-11732
2014-03-24Update incorrect type specificationsPeter Andersson
2014-03-24Fix code to get rid of dialyzer warningsPeter Andersson
2014-03-12Merge branch 'peppe/common_test/group_events'Peter Andersson
* peppe/common_test/group_events: Update test suites and fix various remaining problems Update event protocol and CT Hooks API Introduce group name for skipped cases in events, hooks and overview log OTP-11732
2014-03-12Update event protocol and CT Hooks APIPeter Andersson
2014-03-12Introduce group name for skipped cases in events, hooks and overview logPeter Andersson
2014-02-14Fix edoc usage errorsPierre Fenoll
Errors discovered using `erldocs`: Superfluous @hidden tag would exit edoc application; 'Multiple @spec tag': appended a @clear tag after macro condition; '@spec arity does not match': added missing argument.
2014-01-28Make temporary fix of problem that sometimes causes the ct_util server to diePeter Andersson
2013-11-19Modify the auto_skip report for group config funcs to include group namePeter Andersson
Also correct failing test cases and find and fix remaining bugs.
2013-11-18Fix problems with info functions and add more testsPeter Andersson
2013-11-18Add test cases for new and modified functionalityPeter Andersson
2013-11-18Correct tests cases that fail because of modified eventsPeter Andersson
2013-11-18Correct various bugs related to auto_skip and groupsPeter Andersson
2013-11-18Change status from skip to auto_skip for config func that fails due to requirePeter Andersson
2013-10-31Fix problem with handling Config and FW reports correctlyPeter Andersson
2013-04-16[common_test] Add link from red error notification to full error descriptionSiri Hansen
In test case log, the red error notification may sometimes be truncated. This commit adds a link from this printout to the end of the log where the full error description and stacktrace i written.
2013-04-16[common_test] Use max importance when logging errorsSiri Hansen
This commit adds ?MAX_IMPORTANCE to error notifications in the test case log, and it makes sure that the printout says "CT Error Notification". Printouts from cth_log_redirect (sasl and error_reports) uses ?STD_IMPORTANCE and states "System" in the printout.
2013-03-25[common_test] Add -force_stop skip_rest option when repeating testsSiri Hansen
To allow a repeated test to finish immediatly, 'skip_rest' option can now be used in combination with 'force_stop'. If this option is used, only the current testcase will be completed after timeout is reached when repeating with 'duration' or 'until'.
2013-01-25[common_test] Update common test modules to handle unicodeSiri Hansen
* Use UTF-8 encoding for all HTML files, except the HTML version of the test suite generated with erl2html2:convert, which will have the same encoding as the original test suite (.erl) file. * Encode link targets in HTML files with test_server_ctrl:uri_encode/1. * Use unicode modifier 't' with ~s when appropriate. * Use unicode:characters_to_list and unicode:characters_to_binary for conversion between binaries and strings instead of binary_to_list and list_to_binary.
2012-11-20Merge branch 'maint'Peter Andersson
Conflicts: lib/common_test/test/Makefile
2012-11-19Implement new group search functionalityPeter Andersson
OTP-10466
2012-09-19Teach test_server to report severe errors to common_testBjörn Gustavsson
If a severe error occurs in test_server (e.g. failing to write to log files), test_server would terminate without commont_test knowing about it. Since ct_run can now return an exit code, it is important that common_test is aware of severe problem so that it can indicate that an error has occurred.
2012-08-24Solve problem with registering parallel testcasesPeter Andersson
2012-08-23Solve problems with verbosity levels and parallel test casesPeter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/break_and_continue' into maintPeter Andersson
* origin/peppe/common_test/break_and_continue: Fix error in documentation Implement support for test case execution break/continue Conflicts: lib/common_test/src/ct.erl lib/common_test/src/ct_run.erl OTP-10127 OTP-10172