[jira] [Commented] (OFBIZ-11744) As an OFBiz Developer I want to use parametrized Unit Testing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-11744) As an OFBiz Developer I want to use parametrized Unit Testing

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17117418#comment-17117418 ]

Carsten Schinzer commented on OFBIZ-11744:
------------------------------------------

In a first attempt to implement the JUnit4 or JUnitParams approach for testing a simple method I failed to make this work with the current architectural constraints.

When attempting to implement a test class as a subclass to the usual

org.apache.ofbiz.serivce.testtools.OFBizTestCase < org.apache.ofbiz.entity.testtools.EntityTestCase < org.junit.TestCase

hierarchy the annotated test methods are not found.

 

> As an OFBiz Developer I want to use parametrized Unit Testing
> -------------------------------------------------------------
>
>                 Key: OFBIZ-11744
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11744
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: Gradle, tools
>    Affects Versions: Trunk
>            Reporter: Carsten Schinzer
>            Priority: Major
>
> In order to run the same test logic with various values and test the framework's behaviour I want to use parametrized JUnit Testing. This will work through several approaches:
>  * JUnit4 offers the use of runners and comes with a org.junit.runners.Parameterized on board.
>  * JUnitParams is an open source extension to ease the use of params.
>  * JUnit5 comes with a different approach
> Overview articles can be found here:
> [https://blog.parasoft.com/how-to-create-junit-parameterized-tests-faster]
> [https://www.testwithspring.com/lesson/writing-parameterized-tests-with-junit-4/]
> [https://github.com/Pragmatists/junitparams/wiki/Quickstart]
> [https://www.baeldung.com/junit-params]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)