Configuring One or More Tests with Multiple AUTs

If you have the scenario where you have one or more tests in a single execution plan and they test against multiple AUTs, you should structure your testing as follows:

  1. Create a ProcessExecutor test that will start your code analysis application. The ProcessExecutor Argument List should start your code analysis program. For example:
    • Executable Name:
      cmd
    • Argument List:
      /c start cmd
      /c D:\sctm\dps\two_app_dps.cmd
    Where two_app_dps.cmd contains:
    "C:\Program Files (x86)\Micro Focus\DevPartner\Analysis\dpanalysis.exe" /config D:\SCTM\DPS\configuration_file.xml
    and configuration_file.xml contains:
    <?xml version="1.0" ?>
    <ProductConfiguration>
    	<RuntimeAnalysis Type="Coverage" MaximumSessionDuration="1000" NoUIMsg="true" />
    	<Targets RunInParallel="true">
    		<Process CollectData="true" Spawn="true" NoWaitForCompletion="true" NM_USE_AUTOMATION_INTERFACE="1" >
    			<AnalysisOptions NM_USE_AUTOMATION_INTERFACE="1" NO_MACH5="1" NM_METHOD_GRANULARITY="1" SESSION_DIR="c:\temp" />
    			<Path>D:\SCTM\DPS\SCTMCodeAnalysisTestApp\SCTMCodeAnalysisTestApp\
              SCTMCodeAnalysisTestApp\bin\Debug\SCTMCodeAnalysisTestApp.exe</Path>
    			<Arguments></Arguments>
    			<WorkingDirectory>D:\SCTM\DPS\SCTMCodeAnalysisTestApp\SCTMCodeAnalysisTestApp\
            SCTMCodeAnalysisTestApp\bin\Debug</WorkingDirectory>
    		</Process>
    		<Process CollectData="true" Spawn="true" NoWaitForCompletion="true" >
    			<AnalysisOptions NM_USE_AUTOMATION_INTERFACE="1" NO_MACH5="1" NM_METHOD_GRANULARITY="1" SESSION_DIR="c:\temp" />
    			<Path>D:\SourceCode\SVNQAD\Development\Development\SOURCECODE\
             QADSCTMMigration\bin\QADSCTMMigration.exe</Path>
    			<Arguments></Arguments>
    			<WorkingDirectory>D:\SourceCode\SVNQAD\Development\Development\
             SOURCECODE\QADSCTMMigration\bin</WorkingDirectory>
    		</Process>
    	</Targets>
    </ProductConfiguration>
  2. Create an execution plan.
  3. Click Execution Planning > Details View, select an execution plan, expand the Test Execution Setup area, and click Edit in the Setup Test row.
  4. Add the previously created test as the Setup Test.
  5. Add a test to the execution plan that automates your first application under test with an automated testing tool.
  6. Add another test to the execution plan that automates your second application under test with an automated testing tool.
  7. Create a ProcessExecutor test. The ProcessExecutor Argument List should close your programs:
    • Executable Name:
      cmd
    • Argument List:
      /c TASKKILL /IM application1.exe /IM Application2.exe /F
  8. Click Execution Planning > Details View, select an execution plan, expand the Test Execution Setup area, and click Edit in the Cleanup Test row.
  9. Add the previously created test as the Cleanup Test.