Skip to Content
author's profile photo Former Member
Former Member

How to run Junit in parallel mode in Hybris using unittests target of Hybris platform build.xml

Hello Experts,

In our project we have around 9000 junit test cases which are getting executed every time before generating the Build in Bamboo. This is a client requirement to execute all the junit test cases before generating the build. Because of thee large volume of unit tests, it is taking a long time to execute all the junit test cases. We are using unittests target of platform build.xml file to execut the junit test cases. This target is executing the junits in a sequential manner. Is there any way by which we cn make the junit execution in parallel mode using Hybris build.xml file?

This is bit critical and urgent. Please help me with your ideas.

Thanks in advance..

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Feb 08, 2018 at 11:30 AM

    junit 4 provides parallelization techniques, try to see this example

    JUnit Run Tests in Parallel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2018 at 12:41 PM

    Hi ,

    Thanks for the reply.

    I went through this ParallelComputer feature of Junit4, but not sure how we can integrate this parallelComputer with the Hybris OOTB build.xml file provided in platform.

    Could you please assist with the steps?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2018 at 02:50 PM

    Try to see if it helps you

    Parallel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 09, 2018 at 12:05 PM

    In Hybris OOTB there is the feature to split the tests with the ant-tasks, so that one case run the split tests in parallel. Maybe you can try it out ... Actually, I haven't tried to run the split tests parallel them, but would be curious to have known if you try it out, in particular regarding the test reports.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.