Questions tagged [dunit]

xUnit-style unit testing for Borland Delphi programs.

DUnit is an Xtreme testing framework for Borland Delphi programs. It was originally inspired on the JUnit framework written in Java by Kent Beck and Erich Gamma, but has evolved into a tool that uses much more of the potential of Delphi to be much more useful to Delphi developers.

Source code and mailing lists are available at DUnit's Source Forge page.

89 questions
1
vote
0 answers

Can I use a real object that implements ToolsAPI's IOTAEditPosition in a DUnit test?

I'm writing a set of wizards to enhance source code editing in the IDE and the text manipulation is done through IOTAEditPosition which I get from BorlandIDEServices. How can I automate tests against my methods so I can assert that the text…
Rafael Piccolo
  • 2,328
  • 1
  • 18
  • 29
1
vote
4 answers

Where is DUnit under Delphi XE?

Looks like DUNIT is already integrated under Delphi XE. But I can't find it. My questions are: How can I access it? Do I have to install it manually? I don't remember Delphi setup to ask me if I want to install DUnit. If I have to install it…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
1
vote
1 answer

What alternative to DUnit with C++ Builder?

I have some projects developed with C++ builder XE. I would like to add some unit test, but the DUnit framework installed is nice for Delphi, but the integration with C++ builder is not so good (and very limited). What other xUnit framework can I…
TridenT
  • 4,879
  • 1
  • 32
  • 56
0
votes
0 answers

How to know the test code coverage in Delphi?

Is there a way to know all the line of codes that was not executed during my test? Manually it's easy but terribly laborious, I put a breakpoint on the line of code, if this breakpoint fire during the test then this line of code was executed else…
zeus
  • 12,173
  • 9
  • 63
  • 184
0
votes
0 answers

Delphi GUI test application not working on Jenkins build server

I'm busy implementing a Jenkins build server for Delphi 2007 projects, with DUnit for test applications. The previous solution was built in a very old version of Hudson, with extensive test code and a large scale of production applications. The…
ejg
  • 1
0
votes
1 answer

Apache Geode - Creating region on DUnit Based Test Server/Remote Server with same code from client

I am tryint to reuse the code in following documentation : https://geode.apache.org/docs/guide/11/developing/region_options/dynamic_region_creation.html The first problem that i met is that Cache cache =…
Yulian Oifa
  • 111
  • 7
0
votes
1 answer

How to mockup TWebRequest/TIdHTTPAppRequest?

I have a function that accept a TWebRequest by argument, eg.: function foo(const request: TWebRequest ): boolean; how can i create a TWebRequest and set some property like: Host ServerPort QueryFields ContentFields I have tried: var …
ar099968
  • 6,963
  • 12
  • 64
  • 127
0
votes
0 answers

CEF4Delphi unit test not

I am testing a TFrame with CEF4Delphi component in it but I have issues when it comes to freeing up the TForm containing the TFrame and the relevant CEF4Delphi components. The following is a Minimal Example program MyTFrameExample; { Delphi DUnit…
pio pio
  • 732
  • 1
  • 7
  • 29
0
votes
2 answers

DUnit test - Cannot create form. No MDI forms are currently active

I'm starting with DUnit tests so sorry in advance for any newbie mistakes. When I tried to run simple tests and the compiler runs the SetUp of my test class, it stops returning the message 'Cannot create form. No MDI forms are currently active'.…
DTondin
  • 147
  • 1
  • 2
  • 9
0
votes
1 answer

Strange unit version error - Is DUnitX depending on DUnit or the other way around?

I was using Delphi xe4 to compile https://github.com/hprose/hprose-delphi/blob/master/Test/HproseTest.dpr And got the following error which I spent tens of minutes and still couldn't figure out why. I've tried deleting all 'DUnitX*.dcu" and compile…
Edwin Yip
  • 4,089
  • 4
  • 40
  • 86
0
votes
0 answers

DUnit console app not running as a console app

I have a strange problem. I have a DUnit (Delphi Berlin) application, which I need to run as both GUI (on my development machine) and as a console app (on the build machine). I just copied the project file, renamed it. I have the usual : {$IFDEF…
Steve
  • 6,382
  • 3
  • 41
  • 66
0
votes
1 answer

Delphi pass string to procedure gets an access violation error

I am currently trying to create a test procedure and pass it a string. And the function checks the string for equivalence. The problem is that when the test runs, I get a access violation error of EAccessViolation on the string that I pass inside…
Sari Rahal
  • 1,897
  • 2
  • 32
  • 53
0
votes
1 answer

DUnit on older C++Builder versions?

We are currently migrating our sources who were developed under C++Builder 5 to the newer Embarcadero's XE5. Thinking ahead, we would like to write our unit tests under C++Builder5 which, ideally, would be fully functional after the migration with…
-1
votes
1 answer

Delphi Unit test coverage with teamcity

This may be a stupid question, but i can find any answers anywhere. I am setting up teamcity CI for building my delphi projects and am trying to get teamcity to run my DUnit tests and show the out put in the teamcity build log UI but i have no idea…
diegeelvis_SA
  • 453
  • 3
  • 8
1 2 3 4 5
6