byte-physics / igortest

Igor Pro Universal Testing Framework
https://docs.byte-physics.de/igor-unit-testing-framework/
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Introduce constants to simplify configuring output #345

Open Garados007 opened 1 year ago

Garados007 commented 1 year ago

Right now RunTests contains two parameter enableTAP and enableJU which selects which output should be generated. Introducing a single output parameter which replaces enableTAP and enableJU can simplify the configuration and future extensions. It is only necessary to add more constants, which is easier than introducing new parameter. This can also simplify some internal code paths and function calls.

Right now I can think of the following constants:

Usage example:

    RunTests("Proc0", output = UTF_OUTPUT_JUNIT4 | UTF_OUTPUT_COBERTURA | UTF_OUTPUT_TAP14, traceWinList = "Proc0")
Garados007 commented 1 year ago

This will remove the HTMLCREATION setting for traceOptions in RunTests.

Garados007 commented 1 year ago

We can also remove the fixLogName parameter and introduce a UTF_OUTPUT_FIXED_NAME constant. This makes it easier to transport the information to the necessary places and configuring this.

t-b commented 1 year ago

We could do that yes. But I'd like to retain compatibility with earlier versions, so the existing parameters would need to stay. But also translating them to the new approach would make the code nicer I guess.

Garados007 commented 1 year ago

During this we will collect more an more "Altlasten" (legacy code which is only used to keep support with old versions) which makes our public API cluttered. At one point we need to make a major release which removes a big parts of it. I don't know when the time is come but we have to keep this in mind. Creating an issue to keep track could be maybe a good idea.

t-b commented 1 year ago

At one point we need to make a major release which removes a big parts of it.

We do have https://github.com/byte-physics/igor-unit-testing-framework/issues/13 to track these breaking changes.

I'm all for removing legacy code, but it involves quite an effort to upgrade on our side.