Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intraweb DUnit Testing
#21
I'm working on a new update which will resolve this issue. Seems that the installer is not copying the file to the correct location.

I'll keep you posted.

Cheers,
Reply
#22
Hi Bob,

Please update to this version: https://www.atozed.com/2021/11/intraweb-15-2-44/

I believe all issues have been fixed. I manually tested the installation and file IWTestFramework.res is being correctly installed. Also the wizard is creating a correct project file (and unit test files) as well.

Please let me know how it goes.

Cheers,
Reply
#23
Thanks very much for your support. All issues have been fixed, the generate DUnit Test project compiles and runs without AV. The only thing about the generated code is that you cannot call Free (of the Session) in the Test method, but must delay that until the TearDown method:


type
  TIWTestCase1 = class(TTestCase)
  private
    Session: TIWTestApplication;

...

procedure TIWTestCase1.SetUp;
begin
  // Setup
  Session := NewSession();
end;

procedure TIWTestCase1.TearDown;
begin
  // Clean up
  Session.Free;
end;

procedure TIWTestCase1.Test;
begin
  with Session.MainForm as TIWForm1 do
  begin
    // your testcode here...
  end;
end;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)