Use the idea of ​​the class and the reflection of Java, build a flexible, reasonable system (3)

zhaozj2021-02-17  55

Use the idea of ​​the class and the reflection of Java, build a flexible, reasonable system

- Write to Java beginners

Part III: The overall concept of the system

I. Description of the automated test steps

In this envisioned automation test system, we use XML as a description of the test steps. Since we want to conduct automation tests, then we must do some ideas for testing. First, the test is always one step (Step) to execute; each step is tested, it has its own test mode, or it is said to be a test operation (Operation); second, the results of the test need to be verified (VALIDATE The verification is based on a condition (condition) to determine whether the verification is passed. Therefore, according to the above idea, we can define a "test procedure XML configuration file"; the approach framework is as follows: "Test step XML configuration file":

The XML file given above describes an envisioned test step (Step). As you can see, this step (Step) includes an operation (Operation); and indicates the main purpose of this operation. To perform this test step (Step), we must fill in the URI to be accessed in the field; in the field, we can specify a success (Success) or failure; no matter or Failure, they all include two fields: and ; in the XML given in the previous, shows this is a condition! This condition means: Response must contain the specified characters, we can fill in the characters we need to verify in ! Maybe you feel troublesome about how much XML fields need to fill in. However, please remember that this article is to give Java beginners a class of ideas and system design methods, not to ask everyone to fill in specific test profiles! Ok, a brief introduction to "Test Step XML Profile" is here. The reason why the previous "Test Step XML Profile" is prepared for the following XML file initialization!

转载请注明原文地址:https://www.9cbs.com/read-30642.html

New Post(0)