R13B03以后 OTP的模块加入了大量的测试模块,这些模块都是common_test的使用例子. 我们可以学到的2点 1. 如何编写common_test 2. 如何养成好习惯,为我们自己的工程编写测试案例.
以下是如何允许测试案例:
原文地址:
http://wiki.github.com/erlang/otp/running-tests
Running tests
Building
Build the tests like this
make release_tests
Running
To run the test first do:
cd release/tests/test_server
and then start Erlang:
$ERL_TOP/bin/erl
Install the ts framework
ts:install().
To run all test suites do
ts:run().
Note that running all tests will require several hours, so you may want to run the test cases for a single application
ts:run(Application, [batch]).
or even part of the test suite for an application, for example
ts:run(emulator, bs, [batch]).
to run all test suite modules starting with bs (i.e. all modules that test the bit syntax).
To run a specific test case in a module, the full name of the module and test case must be spelled out:
ts:run(emulator, bs_bincomp_SUITE, byte_aligned, [batch]).
Run ts:help() to show some help.
There will currently be 15 or so failed test cases in the kernel application.
Examining the results
Open the file release/test/test_server/index.html in a web browser. Or open release/test/test_server/last_test.html when a test suite is running to examine the results so far for the currently executing test suite.
分享到:
相关推荐
Lesson 5: Running Tests ......................................................................75 Defining Test Sets ................................................................................76 ...
Towards the end of this book, you'll get to grips with Selenium Grid, which is used for running tests in parallel using nodes for cross-browser testing. It will also give you a basic overview of the ...
The book will also help you set up unit and integration testing with different libraries and will show how Gradle and Android Studio can make running tests easier. Finally, you will be shown a number...
The book will also help you set up unit and integration testing with different libraries and will show how Gradle and Android Studio can make running tests easier. Finally, you will be shown a number...
Running tests The library has two sets of tests. The first set is a number of qunit tests that check that different values parsed by browsers are correctly converted in ...
The book will also help you set up unit and integration testing with different libraries and will show how Gradle and Android Studio can make running tests easier. Finally, you will be shown a number...
tests against js solutions npm install npm test # running tests for specific file npm test < regex > # example running tests against _1.rs npm test _1 # watch mode npm run test:watch npm run test:...
Running Tests 110 Writing Tests 114 Debugging with GDB 116 In this document 116 Debugging 117 Just-In-Time Debug Feature 119 Debugging Native Code 120 In this document 120 Capturing logs 120 Debug ...
在本文中,我们将深入探讨如何在Visual Studio 2010中创建和运行单元测试,这对于软件开发过程中的质量保证和代码维护至关重要。单元测试是一种软件开发实践,它允许开发者独立地验证应用程序的各个组件,确保它们...
- Techniques for setting up and running tests using the CETK. - Best practices for interpreting test results and making improvements based on feedback. **14. Developing Tux Extension Components to ...
echo 'Running tests...' // 执行测试任务 } else { echo 'Tests skipped.' } } } } } } ``` 四、条件控制执行不同stage 通过参数和条件语句,我们可以构建出动态的Pipeline,使得不同输入可以触发不同的...
Debugging Applets, Applications, and Servlets <br>Collecting Evidence Running Tests and Analyzing Servlet Debugging AWT Event Debugging Analyzing Stack Traces Version Issues ...
Running the sample tests 12 Breaking things on purpose 15 Test errors versus test failures 20 Command line options for running tests 23 Verbosity 24 Settings 27 Pythonpath 27 Traceback 27 No...
print("Running tests...") # 这里执行运行测试的逻辑 # 标记为可从命令行调用的任务 @task def default(): build() test() ``` 在上述示例中,`build`和`test`函数是两个任务,而`default`函数被标记为默认...
#### Running tests (运行测试) - **命令行运行**:通过命令行工具运行测试。 - **IDE集成**:使用集成开发环境中的测试运行功能。 #### Automatically Executing Tests (自动执行测试) - **持续集成**:每次提交...