Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update testing directions #534

Open
BNAndras opened this issue Jan 10, 2025 · 5 comments
Open

Update testing directions #534

BNAndras opened this issue Jan 10, 2025 · 5 comments

Comments

@BNAndras
Copy link
Member

Using Delphi 12, my solution compiles for me and spits out an XML file with the DUnitX results. It seems I could document the location and structure of this file inside our testing directions. I'd provide an example test suite and results so students know how to interpret the results.

@rpottsoh
Copy link
Member

I don't know how useful this. I also don't know that it isn't useful at all as well. The onscreen output is typically enough to help the programmer figure out what needs to be fixed. The test result should be providing expected result when a test fails. I don't want to discourage you from helping out in anyway possible. Just pointing out how I see things.

@BNAndras
Copy link
Member Author

The thing is I’m not seeing any onscreen output. Using the Delphi 12 defaults and the bundled DXUnit, the compiled program flashes and then closes on Windows 11. Therefore, I need to check the results XML file.

@rpottsoh
Copy link
Member

rpottsoh commented Jan 10, 2025 via email

@BNAndras
Copy link
Member Author

You mean run the compiled executable? The console window opens, runs, and closes. The DUnitX XML file is updated correctly with all tests passing.

@rpottsoh
Copy link
Member

@BNAndras that is correct. If you open a command prompt at the location of the exe, when you run it, you will see the results of the test on the screen. You miss this when you run the testrunner from the debugger because the execution window is immediately closed. If you set TDUnitx.Options.ExitBehavior equal to TDUnitXExitBehavior.Pause then execution will be paused at the very via. a readln statement, see the .DPR of any of the exercises. I am not sure the best way to set the ExitBehavior, maybe there is a command line parameter you can have Delphi pass, short of that you could just force the readln to occur. Personally, I just run the exe from the command line unless I need to use the debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants