Wednesday, October 3, 2012

Sample Ant Script for running targets parallel and sequential

Recently ,I faced a challenge for making one target which can run the entire suite with lot of module dependencies.This was resolved with the help of ant targets: sequential and parallel.

Requirement :
I need to run the following sequetially

1.compile target
2. run and run_psdata targets paralelly
3.run_PreData,run_DFPPulls,run_AdTechPulls.... parallelly
4.run_PostData,run_Sales parallely
5.run_Administration,run_E2EPartner360,..... parallelly
6.run_Alerts,run_CustomFields  parallelly
7.Stop selenium

Below is the code to do all the above steps sequentially

<target name="CItarget">    
            <antcall target="compile"/>
              <antcall target="run"/>
              <antcall target="run_PSDATA"/>
                <antcall target="run_PreData"/>
                <antcall target="run_DFPPulls"/>
                <antcall target="run_AdTechPulls"/>
                <antcall target="run_AppnexusPulls"/>
                <antcall target="run_FTPPulls"/>
                <antcall target="run_OASPulls"/>
                <antcall target="run_GDFPPulls"/>
                <antcall target="run_FreewheelPulls"/>
                <antcall target="run_ThirdPartyPulls"/>
        <antcall target="run_PostData"/>
        <antcall target="run_Sales"/>
                <antcall target="run_Administration"/>
                <antcall target="run_E2EPartner360"/>
                <antcall target="run_Finance"/>
                <antcall target="run_Loaders"/>
                <antcall target="run_Accounts"/>
                <antcall target="run_Adops"/>
                 <antcall target="run_Alerts"/>
                <antcall target="run_CustomFields"/>
            <antcall target="stop-selenium"/>

No comments:

Post a Comment