I support doing the simplest thing (moving TestUtils from src/test/scala to 
src/main/scala), but we could consider splitting TestUtils if you need only 
(say) 20% of TestUtils for testing separate DFDL schemas.  Give a more 
descriptive name than "TestUtils" to the new class in src/main/scala, move the 
parts you need to it, and leave the remaining parts in the original TestUtils 
in its original location.  The drawback is that existing tests would have to 
use the new name for these 20% parts too.

Please, please, fix the IDE warnings, check the code coverage report for unused 
parts, and add good scaladocs to everything before saying the new file is ready 
for use.  If something in Daffodil will be used to test separate applications 
or separate daffodil schemas, it needs to be coded cleanly and documented well.

John

-----Original Message-----
From: Mike Beckerle <mbecke...@apache.org> 
Sent: Thursday, May 9, 2024 12:30 PM
To: dev@daffodil.apache.org
Subject: EXT: Re: Test tools put them where?

Crickets on this.

If you want to see these tools in use, look at the gzip layer tests in
daffodil-core.


On Sat, Mar 23, 2024 at 11:34 PM Mike Beckerle <mbecke...@apache.org> wrote:

> I have some new fuzz testing stuff.
>
> It depends on TestUtils which is in daffodil-core, but lives in the
> src/test, so isn't in the packaged daffodil jars.
>
> I want to use this stuff to test separate DFDL schemas. Those depend on
> the packaged daffodil jars.
>
> TestUtils is effectively an application layer on top of
> daffodil-core/runtime1; however, there are 241 references to it from within
> daffodil-core/src/test, so it's heavily used there.
>
> What's a sensible reorganization of things so as to still be able to use
> TestUtils inside daffodil-core, but also be able to use it for DFDL schema
> testing outside of daffodil entirely?
>
> The simplest thing is just to move it from src/test/scala to
> src/main/scala. Then other things can depend on it, nothing about tests in
> daffodil-core changes either.
>
> Another possibility is to move TestUtils to a daffodil-test-tools module,
> but then the tests that depend on this module have to move out of
> daffodil-core because daffodil-test-tools will depend on core.
>
> Yet a third possibility is to publish a daffodil-core test jar so that
> others can depend on things in daffodil-core src/test.
>
>
>
> Mike Beckerle
> Apache Daffodil PMC | daffodil.apache.org
> OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
> Owl Cyber Defense | www.owlcyberdefense.com
>
>
>

Reply via email to