Java Code to run specific test in .tst File

rafi_mrafi_m Posts: 6
edited October 2018 in SOAtest

I have a test file where I have two test.
1. Rest Client
2. Write File Tool named CustomWrite
I'm using a java class as below to invoke this test

        TestExecutionsRequest queueInput = new TestExecutionsRequest();
        General general = new General();
        general.setConfig("soatest.user://Example Configuration");
        general.setShowdetails(true);
        queueInput.setGeneral(general);
        ScopeOptions scope = new ScopeOptions();
        Workspace workspace = new Workspace();
        workspace.setResources(Arrays.asList(resource));
        scope.setWorkspace(workspace);
        queueInput.setScopeOptions(scope);
        SoatestOptions soa=new SoatestOptions();        
        TestName names=new TestName();
        names.setValue("CustomWrite");
        names.setMatch(true);
        soa.setTestNames(Arrays.asList(names));

        queueInput.setSoatestOptions(soa);
        TestExecutionsResponse queueResponse = null;
        try {
            queueResponse = service.queue(queueInput);

my intension is to run only one test "Rest Client" and I don't want to run "Write File". I'm not sure if I have used soaTestOptions correctly. but when i run the above code, both the test runs. please help

Comments

  • rafi_mrafi_m Posts: 6

    Can someone help me please...

  • benken_parasoftbenken_parasoft ✭✭✭ Posts: 751 ✭✭✭

    SOAtest Server currently ignores what you set in "TestName" in "SoatestOptions". This is a known issue (SOA-9815) but the fix has already been made for the next release (9.10.7).

Sign In or Register to comment.