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

zhaozj2021-02-17  60

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

- Write to Java beginners

Keywords:

Object design, XP, reflection, abstract class

introduction:

Recently, I am responsible for the test of a web project. The main content of the work is to design test cases and execution tests. During this period, some ideas for testing and testing tools were caused by testing. This is desirable to enable automation testing, mitigation of testing workload, and improve the quality and efficiency of tests.

The design of the test case and the implementation of the automated test are not the purpose of this article.

The main focus of this article is:

How to use the idea of ​​the class (interface, abstract class, and concrete class) and the reflection technology of Java, design a better system and the XP part (mainly Test First First) Thought! Construct a flexible system.

This paper consulates a flexible and reasonable system for programming beginners (mainly learning Java language) and hopes to use objects and classes in their own procedures.

I hope this article can help program design beginners, reducing them to learn the misunderstanding of object-oriented design, and design their own classes, build their own systems.

This article is not intended to explain the "how specific encoding". So, everyone can't see too many codes from this article; friends who like Copy & Parse, then verify the effect, have to say Sorry. In fact, we should develop a habit of "emphasis, light operation".

"Theoretical Guidance Practice"!

Remember, here, let us always "Keep Oo in Mind"!

Again explanation:

This article does not intend to introduce automation tests. Just want to test this topic by automation, leading to how to build a flexible automation test system (an envisioned system / framework).

Please "automatically" automatically "automated test" related information related to the subject of this paper, retain information related to object-oriented, system design.

Part 1: Introduction to the overall frame design of the system

Here, I will introduce it to the automation test system we envisage, what should be a system! So we can better design and implement it later;

First, goals:

Construct a flexible automation test system (framework);

Second, the requirements:

The system is required to have: scalability, clear level, in line with the basic requirements of XP;

(省 省 省 省 省 要求 本 要求)

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

New Post(0)