testNG总结三(主要annotation以及annotation周期图)

一、annotation的概念

通过annotation去标记method 和class, 组织测试用例。

二、主要的annotation

1) Before/After annotation

image


2)   @Test annotation

testNG-test-annotation


3)  其他annotation

image


三 、Before/after annotation的周期图

TestNGFlowAnnotation.java

annotationFlow.xml

image

分析 测试 代码的执行过程可知,before/after系的annotation可知,生命周期图如下:

image

原文地址:https://www.cnblogs.com/gracejiang/p/15324546.html