procedure TearDown; override; //清除数据
end;
加入实现代码
procedure TestSetupTest.SetUp;
begin
ShowMessage('TestSetupTest Setup');
end;
procedure TestSetupTest.TearDown;
begin
ShowMessage('TestSetupTest TearDown');
end;
修改TtestCaseFirst.SetUp及TTestCaseFirst.TearDown,加入下面加粗语句。
procedure TTestCaseFirst.SetUp;
begin
BeTestForm := TBeTestForm.Create(Nil);
ShowMessage('TTestCaseFirst Setup');
end;
procedure TTestCaseFirst.TearDown;
begin
BeTestForm.Destroy;
ShowMessage('TTestCaseFirst TearDown');
文章来源于领测软件测试网 https://www.ltesting.net/