Skip to content

CodeCoverage.exe does not call the unit test exe file #34

Description

@MHumm

Am I am doing anything wrong?
CodeCoverage.exe (newest version from a few days ago) no longer calls the exe of the unit test.
Here's the contents of the batch file used to run it:

"D:\Projekte\DelphiCodeCoverageWizardNew\Binaries\CodeCoverage.exe" -e "D:\Projekte\DECGitMaster\Compiled\BIN_IDE22.0_Win32_Debug\DECDUnitXTestSuite.exe" -m "D:\Projekte\DECGitMaster\Compiled\BIN_IDE22.0_Win32_Debug\DECDUnitXTestSuite.map" -sd "D:\Projekte\DECGitMaster\Source" -ife -uf "D:\Projekte\DECGitMaster\Unit Tests\CodeCoverage\DECCodeCoverage_dcov_units.lst" -spf "D:\Projekte\DECGitMaster\Unit Tests\CodeCoverage\DECCodeCoverage_dcov_paths.lst" -od "D:\Projekte\DECGitMaster\Unit Tests\CodeCoverage\Output" -v -lt "D:\Projekte\DECGitMaster\Unit Tests\CodeCoverage\Output\DECCodeCoverage_DelphiCodeCoverageDebug.log" -html

The log file reads (among other messages):
"Trying to start D:\Projekte\DECGitMaster\Compiled\BIN_IDE22.0_Win32_Debug\DECDUnitXTestSuite.exe with the Parameters :
Started successfully" But I never see any window running my DUnitX tests. In earlier attempts it was displayed.

If you need more data please tell me.
Another thing: it would be nice if CodeCoverage.exe had version info in it (project options -> there's a checkbox to include version info) and would be able (if necessary I can give you code to do so) to write that version number into the log file, so it gets easier when analyzing log files to search for bugs which version has been used.

How to get in touch to make CodeCoverage.exe work again for my project?
Ironically it works when I use it with the DUnit test project (GUI test runner) of the very same project (I have all test cases there in both ways: DUnit and DUnitX).

Activity

  1. ekot1 commented on Dec 1, 2022

    @ekot1
    Contributor

    Command line seems to be fine, could you add full sample project so I can reproduce it?
    I've added displaying version to log file

  2. MHumm commented on Dec 1, 2022

    @MHumm
    Author

    The project used for testing is the development vbranch of this one:
    https://github.com/MHumm/DelphiEncryptionCompendium

    Just download it, put it into the folder I use in the batch file or adapt the paths. Then run SetIDEPaths project from Install subfolder and restart the IDE. Afterwards you can open the project group from Source folder and manually compile the DUnit and DUnitX projects or run CompileAll.cmd.

    If anything's unclear about the steps let me know.

  3. MHumm commented on Dec 1, 2022

    @MHumm
    Author

    Have you already found the time to try the sample I mentioned to you? Didi it work? I can provide the lst files for that one.

  4. ekot1 commented on Dec 8, 2022

    @ekot1
    Contributor

    I'm trying it now, but there are no .lst files mentioned in command line. I'll try to add some sample ones.

  5. MHumm commented on Dec 8, 2022

    @MHumm
    Author

    Attached is something which might help you:

    DECCodeCoverage_dcov_units.zip

    The DCCP project file is from my Code Coverage Wizard Plus application, current developmen branch version.

  6. ekot1 commented on Dec 9, 2022

    @ekot1
    Contributor

    I could not reproduce it, I noticed couple of issues with configuration though - in your command line above you use BIN_IDE22.0_Win32_Debug folder, but default configuration in DECDUnitXTestSuite is GUI so folder name should be BIN_IDE22.0_Win32_GUI, another thing is neither GUI configuration nor its parent Debug configuration have .map file creation enabled. After I fixed these issues it worked for me.
    Here is command line I used

    set root=C:\DelphiEncryptionCompendium-development
    "..\..\dcc\CodeCoverage.exe" -e "%root%\Compiled\BIN_IDE21.0_Win32_Debug\DECDUnitXTestSuite.exe" -m "%root%\Compiled\BIN_IDE21.0_Win32_Debug\DECDUnitXTestSuite.map" -sd "%root%\Source" -ife -uf "%root%\Unit Tests\CodeCoverage\DECCodeCoverage_dcov_units.lst" -spf "%root%\Unit Tests\CodeCoverage\DECCodeCoverage_dcov_paths.lst" -od "%root%\Unit Tests\CodeCoverage\Output" -v -lt "%root%\Unit Tests\CodeCoverage\Output\DECCodeCoverage_DelphiCodeCoverageDebug.log" -html
    
    
  7. MHumm commented on Dec 9, 2022

    @MHumm
    Author

    Sorry, I had forgotten to tell you that the verison on GitHub doesn't have map file creation on by default (at last as far I I rmember right now). I had that turned on of course when testing. Maybe I find another few minutes over the weekend to set up a proper case where it doesn't work.

  8. MHumm commented on Dec 21, 2022

    @MHumm
    Author

    Above you set a variable "root" from your batch file:
    set root=C:\DelphiEncryptionCompendium-development
    Is this variable specific to CodeCoverage? I couldn't find any relevant documentation on the internet about this.
    What does it do?
    I would like to release V2.0 of the Code Coverage Wizard Plus soon, so if you like you could have a look at it to check if I implemented things the right way, means it works properly in relative and non relative mode, means it generates a proper standalone runnable batch file for both modes each.

  9. ekot1 commented on Dec 28, 2022

    @ekot1
    Contributor

    No, root variable is just to avoid duplication of path in batch file, it is not used in CodeCoverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions