官术网_书友最值得收藏!

Pillar 4 – Test runner and test isolation

Goal: Understand what a test runner and its test isolation are and learn how to use and apply them.

Given the previous three pillars, we are positioned to write test cases as follows:

  • Using test codeunit and test functions
  • Either sunny or rainy path, the latter by applying the asserterror keyword
  • With fully automated execution addressing any user interactions by applying handler functions

Do we need more?

As a matter of fact, yes, we do, as we need a way to do the following:

  1. Run tests stored in multiple codeunits, control their execution, and collect and secure the results
  2. Run tests in isolation, so that we can achieve the following:
    • Write transactions, in the end, do not alter the database we run the test on
    • Each rerun of a test is done using the same data setup

Both goals can be accomplished using a so-called TestRunner codeunit with a certain test isolation. A test runner codeunit is defined by its Subtype and the isolation by its TestIsolation:

codeunit Id MyTestRunnerCodeunit
{
Subtype = TestRunner;
TestIsolation = Codeunit;
}
主站蜘蛛池模板: 遂昌县| 庄浪县| 北流市| 全州县| 南郑县| 平安县| 三原县| 镇沅| 亚东县| 靖安县| 襄樊市| 开鲁县| 增城市| 兴城市| 义乌市| 都江堰市| 潞城市| 大同县| 临江市| 探索| 香港 | 滕州市| 克什克腾旗| 庄浪县| 北海市| 蒙山县| 海盐县| 启东市| 平潭县| 商都县| 新巴尔虎右旗| 襄城县| 安徽省| 泸水县| 湾仔区| 综艺| 西乌| 安多县| 都昌县| 綦江县| 东乡县|