You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streams.apache.org by sblackmon <sb...@apache.org> on 2016/12/15 19:11:37 UTC

Re: [DISCUSS] Switch from JUnit to TestNG for failsafe integration testing.

This is just about wrapped up - the last PR to merge is

https://github.com/apache/incubator-streams-examples/pull/23

Also relevant to release prep is

https://github.com/apache/incubator-streams/pull/342

With those merged all unit and integration tests should be passing.

I’d like to merge these by tomorrow to prepare us to start the next release this weekend.

Steve
On November 26, 2016 at 1:21:57 PM, Suneel Marthi (smarthi@apache.org) wrote:

+1 to this proposal, we should standardize on one test framework across the  
project from what's presently out there.  

On Sat, Nov 26, 2016 at 11:17 AM, sblackmon <sb...@apache.org> wrote:  

>  
> Hello,  
>  
> I propose that we bind failsafe plugin to TestNG rather than JUnit  
> project-wide.  
>  
> The reason is simple - TestNG supports placing tests into groups and  
> declaring dependencies that determine which order all tests in the module  
> run in - and JUnit does not.  
>  
> Consider the following scenario - a provider module test plan includes the  
> following:  
> a) collect documents  
> b) validate the collected documents against their upstream schema(s)  
> c) convert the collected documents to activity and activity object  
> schema(s)  
> d) validate the converted documents, using an appropriate validator for  
> each verb and object type  
>  
> If we have the ability to specify the order of test execution, that test  
> plan might be 2, 3, 4, or more separate test classes.  
>  
> If not, all of that mostly orthogonal testing has to be corralled into a  
> single test class just to ensure proper order of execution.  
>  
> All of our provider and persist module can have more complex yet more  
> simply organized tests using this model.  
>  
> As for surefire plugin for unit testing, I’m ambivalent - I would think we  
> can leave it on JUnit unless there’s a clear benefit to switching it also.  
>  
> Making the switch should be easy -  
> 1) remove org.junit imports in every class ending with IT  
> 2) import the corresponding org.testng.annotations instead.  
> 3) swap the failsafe binding in the streams-master pom  
> 4) confirm the same number of tests run during integration-test and all  
> still pass.  
>  
> Any objections or related ideas to consider?  
>  
> Steve  
>  
>  
>  
>  
>