You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2020/10/14 09:38:13 UTC

[DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Hi all,

currently the Java drivers are the only ones having support for the XML testsuites I built.
Now I would like to setup the same testsuite infrastructure for my PLC4Go drivers.

For that I would need the same XML test-definitions.

So I thought, and I think we discussed this at least on slack before, it would be cool to move these test-definitions into the protocol modules.

This way we can define the mspecs and provide tests for the mspecs which are theoretically runnable on all platforms in the same module.

So if we extend an mspec and add some additional test declarations, these should automatically run in all languages we support.

What do you think?


Chris

Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Volker Emmert <v....@pragmaticminds.de>.
Hi Chris,


sounds like the logical thing to do. And in light of more different 
language implementations definitely a good test setup.


Regards, Volker


Am 14.10.20 um 11:38 schrieb Christofer Dutz:
> Hi all,
>
> currently the Java drivers are the only ones having support for the XML testsuites I built.
> Now I would like to setup the same testsuite infrastructure for my PLC4Go drivers.
>
> For that I would need the same XML test-definitions.
>
> So I thought, and I think we discussed this at least on slack before, it would be cool to move these test-definitions into the protocol modules.
>
> This way we can define the mspecs and provide tests for the mspecs which are theoretically runnable on all platforms in the same module.
>
> So if we extend an mspec and add some additional test declarations, these should automatically run in all languages we support.
>
> What do you think?
>
>
> Chris

Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Łukasz Dywicki <lu...@code-house.org>.
I been thinking of this and maybe it would be better to separate test
cases completely as pure resource project. The "test-jar" packaging (as
well as repository URL) will probably be hard to understand for anyone
outside of maven landscape.
Moving these to pure "jar" or "zip" packaged archive might serve better
other languages. It will definitely not harm java. :-)

Best,
Łukasz


On 16.10.2020 09:39, Christofer Dutz wrote:
> Hi Folks,
> 
> so in the plc4go branch I did the changes and all of the adjustments in the tests this change needed.
> In the end it seems I needed to go down the "test-jar" path as "provided" resources don't seem to be included in the default classpath and I therefore couldn't load them.
> But with the test-jar it works nicely.
> 
> Chris
> 
> 
> 
> Am 14.10.20, 12:51 schrieb "Christofer Dutz" <ch...@c-ware.de>:
> 
>     And I will put them in the "src/main/resources" directory.
>     The mspec is used for the code generation and isn't bundled with the driver.
>     If I put it in "src/test/resources", this would make packaging and using it more difficult.
> 
>     Chris
> 
> 
>     Am 14.10.20, 12:50 schrieb "Christofer Dutz" <ch...@c-ware.de>:
> 
>         Ok ... so I'll do this in my plc4go branch.
> 
>         If you happen to need that for python ... just ping me.
> 
>         Chris
> 
> 
> 
>         Am 14.10.20, 12:48 schrieb "Otto Fowler" <ot...@gmail.com>:
> 
>              +1
> 
>             On October 14, 2020 at 05:38:26, Christofer Dutz (christofer.dutz@c-ware.de)
>             wrote:
> 
>             Hi all,
> 
>             currently the Java drivers are the only ones having support for the XML
>             testsuites I built.
>             Now I would like to setup the same testsuite infrastructure for my PLC4Go
>             drivers.
> 
>             For that I would need the same XML test-definitions.
> 
>             So I thought, and I think we discussed this at least on slack before, it
>             would be cool to move these test-definitions into the protocol modules.
> 
>             This way we can define the mspecs and provide tests for the mspecs which
>             are theoretically runnable on all platforms in the same module.
> 
>             So if we extend an mspec and add some additional test declarations, these
>             should automatically run in all languages we support.
> 
>             What do you think?
> 
> 
>             Chris
> 
> 
> 

Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Folks,

so in the plc4go branch I did the changes and all of the adjustments in the tests this change needed.
In the end it seems I needed to go down the "test-jar" path as "provided" resources don't seem to be included in the default classpath and I therefore couldn't load them.
But with the test-jar it works nicely.

Chris



Am 14.10.20, 12:51 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    And I will put them in the "src/main/resources" directory.
    The mspec is used for the code generation and isn't bundled with the driver.
    If I put it in "src/test/resources", this would make packaging and using it more difficult.

    Chris


    Am 14.10.20, 12:50 schrieb "Christofer Dutz" <ch...@c-ware.de>:

        Ok ... so I'll do this in my plc4go branch.

        If you happen to need that for python ... just ping me.

        Chris



        Am 14.10.20, 12:48 schrieb "Otto Fowler" <ot...@gmail.com>:

             +1

            On October 14, 2020 at 05:38:26, Christofer Dutz (christofer.dutz@c-ware.de)
            wrote:

            Hi all,

            currently the Java drivers are the only ones having support for the XML
            testsuites I built.
            Now I would like to setup the same testsuite infrastructure for my PLC4Go
            drivers.

            For that I would need the same XML test-definitions.

            So I thought, and I think we discussed this at least on slack before, it
            would be cool to move these test-definitions into the protocol modules.

            This way we can define the mspecs and provide tests for the mspecs which
            are theoretically runnable on all platforms in the same module.

            So if we extend an mspec and add some additional test declarations, these
            should automatically run in all languages we support.

            What do you think?


            Chris




Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Christofer Dutz <ch...@c-ware.de>.
And I will put them in the "src/main/resources" directory.
The mspec is used for the code generation and isn't bundled with the driver.
If I put it in "src/test/resources", this would make packaging and using it more difficult.

Chris


Am 14.10.20, 12:50 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Ok ... so I'll do this in my plc4go branch.

    If you happen to need that for python ... just ping me.

    Chris



    Am 14.10.20, 12:48 schrieb "Otto Fowler" <ot...@gmail.com>:

         +1

        On October 14, 2020 at 05:38:26, Christofer Dutz (christofer.dutz@c-ware.de)
        wrote:

        Hi all,

        currently the Java drivers are the only ones having support for the XML
        testsuites I built.
        Now I would like to setup the same testsuite infrastructure for my PLC4Go
        drivers.

        For that I would need the same XML test-definitions.

        So I thought, and I think we discussed this at least on slack before, it
        would be cool to move these test-definitions into the protocol modules.

        This way we can define the mspecs and provide tests for the mspecs which
        are theoretically runnable on all platforms in the same module.

        So if we extend an mspec and add some additional test declarations, these
        should automatically run in all languages we support.

        What do you think?


        Chris



Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Christofer Dutz <ch...@c-ware.de>.
Ok ... so I'll do this in my plc4go branch.

If you happen to need that for python ... just ping me.

Chris



Am 14.10.20, 12:48 schrieb "Otto Fowler" <ot...@gmail.com>:

     +1

    On October 14, 2020 at 05:38:26, Christofer Dutz (christofer.dutz@c-ware.de)
    wrote:

    Hi all,

    currently the Java drivers are the only ones having support for the XML
    testsuites I built.
    Now I would like to setup the same testsuite infrastructure for my PLC4Go
    drivers.

    For that I would need the same XML test-definitions.

    So I thought, and I think we discussed this at least on slack before, it
    would be cool to move these test-definitions into the protocol modules.

    This way we can define the mspecs and provide tests for the mspecs which
    are theoretically runnable on all platforms in the same module.

    So if we extend an mspec and add some additional test declarations, these
    should automatically run in all languages we support.

    What do you think?


    Chris


Re: [DISCUSS] Move the xml files for the parser/serializer tests and the driver integration tests into the protocol modules?

Posted by Otto Fowler <ot...@gmail.com>.
 +1

On October 14, 2020 at 05:38:26, Christofer Dutz (christofer.dutz@c-ware.de)
wrote:

Hi all,

currently the Java drivers are the only ones having support for the XML
testsuites I built.
Now I would like to setup the same testsuite infrastructure for my PLC4Go
drivers.

For that I would need the same XML test-definitions.

So I thought, and I think we discussed this at least on slack before, it
would be cool to move these test-definitions into the protocol modules.

This way we can define the mspecs and provide tests for the mspecs which
are theoretically runnable on all platforms in the same module.

So if we extend an mspec and add some additional test declarations, these
should automatically run in all languages we support.

What do you think?


Chris