[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=17117556#comment-17117556 ]

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

Obviously, the current setup will not be aware of Annotations related to testing, for example:

I have tried to run test cases (for OFBIZ-11692) in methods that are not following the 

{{testSomething (prefix: test)}}

naming convention and "only" annotated them with

{{@Test}}

with the result that they have not been executed / not been mentioned on the testing report (runtime/logs/test-results/TESTS-TestSuites.xml).

> 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: Minor
>
> 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)