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

Initiate unit tests of the source code #108

Open
4 tasks
tekenny opened this issue Nov 11, 2022 · 3 comments
Open
4 tasks

Initiate unit tests of the source code #108

tekenny opened this issue Nov 11, 2022 · 3 comments
Labels
technical debt code cleanup, refactoring, improve comments and/or design

Comments

@tekenny
Copy link
Collaborator

tekenny commented Nov 11, 2022

Description

Where possible and appropriate add unit tests of the source code.
Why - unit testing helps to improve quality by identifying failures as a result of changes to the code base.

Steps To Reproduce

None - no unit test currently exist

Expected behavior

Availability of a automated test suite to help ensure quality

Actual Behavior

Ability to run a test suite

Reproduces how often

Always

Version information

  • Morse Runner version: 1.81
  • OS/Version: Windows 10

Additional context

TASKS

  • 1 - determine which test tool to use Dunit, Dunit2 or FPCunit
  • 2 - choose a Pascal source code file with procedures that can be unit tested
  • 3 - determine what code refactoring will be needed to achieve more unit testing code coverage
  • 4 - write new epic issue for what refactoring and unit testing needs to be added,

Can you help?

Please let us know if you are available to help. (replace '[ ]' with '[x]' to affirm)

  • [ x ] Yes, I'm available to help test a solution to this problem.
@tekenny tekenny added bug Something isn't working technical debt code cleanup, refactoring, improve comments and/or design and removed bug Something isn't working labels Nov 11, 2022
@w7sst
Copy link
Owner

w7sst commented Mar 29, 2023

Hi Tom,
I have identified two units that could benefit from Unit Testing. These are ARRL.pas (DXCC file support) and the new Cty.pas (under development) supporting the wl_cty.dat file. These both appear to be independent units that do not use other units. I could imagine that with some refactoring, we could create a common interface to define a common protocol used to look up DXCC-like information, including Country, Zone, prefix, etc. For now, starting unit testing with either module would be a good to start.

For others, if anyone is interesting in starting work on this, please let me know.

Thank you.

73, Mike W7SST

@w7sst
Copy link
Owner

w7sst commented Aug 22, 2024

@tekenny
Hi Tom,
Are you still available for some Unit Testing discussions and some code reviews. I'm working on #55 (ARRL Sweepstakes Contest). I am implementing a parser to handle the complex exchanges. When I got started, I developed some Unit Tests using DUnitX. It really helped out too. I have over 400 tests running right now.

I am about to start checking in the parser and the SS Contest code.

I was wondering if I could include you on these Unit Test code reviews. I would like your input.

Thank you.

73,
Mike W7SST

w7sst added a commit that referenced this issue Aug 25, 2024
- part of Issue #108
- Adds a group file, MRCE.groupproj containing both MorseRunner and
UnitTests.dproj
- built using DUnitX
- a goal would be that anything going into the Util/ directory would be
unit tested.
@w7sst
Copy link
Owner

w7sst commented Aug 31, 2024

Starting with v1.85 development, several units now have corresponding Unit Tests. The goal should be anything units added to the new ./Util directory should have a corresponding unit test.

The unit tests are stored in a single directory ./Test and has a separate project file Test/UnitTest.dproj.

I will leave this Issue open because there is still more work to do. Next steps would be to find other packages that can be unit tested (see Task list above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt code cleanup, refactoring, improve comments and/or design
Projects
None yet
Development

No branches or pull requests

2 participants