Forum Discussion

jaggu486's avatar
jaggu486
Occasional Visitor
5 years ago

How to create DataSource(of type Grid) test step programaticalla via Groovy/Java

 

Hi Team,

 

I am working on one project to automate test steps creation in a test case.

I need to create a project, test suite, test case. In the test case, I need to add data source step programmatically.

 

Here is my code in Java. Stuck here. Need help on how to create data source step of type Grid and add rows.

 

WsdlTestSuite ts =  wadlProject.addNewTestSuite("HelloTestSuite");
WsdlTestCase tc = ts.addNewTestCase("HelloTestCase1");
//WsdlTestStep testStep = tc.addTestStep("datasource","datasource");
TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
testStepConfig.setType("datasource");
testStepConfig.setName("SoapUI Pro DataSource");
ProPlaceholderStepFactory.WsdlProPlaceholderTestStep testStep = (ProPlaceholderStepFactory.WsdlProPlaceholderTestStep)tc.addTestStep(testStepConfig);

 

  • Project creation is one time activity. Why is it considered to create it programmatically?
  • nmrao's avatar
    nmrao
    Champion Level 3
    Project creation is one time activity. Why is it considered to create it programmatically?
    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Hi jaggu486 ! Could you explain your use case a little so the Community will understand what you are trying to achieve better in order to help you more efficiently?