2

I want to add a new testset in ALM using Com4J. I tried following code:

ITestSetTreeManager treeManager = itd.testSetTreeManager().queryInterface(ITestSetTreeManager.class);
                ITestSetFolder testSetFolder = treeManager.nodeByPath("Root\\Training\\AutomationTest").queryInterface(ITestSetFolder.class);
                ITestSetFactory factory = testSetFolder.testSetFactory().queryInterface(ITestSetFactory.class);
                ITestSet testSet = factory.addItem(new Variant(Variant.Type.VT_NULL)).queryInterface(ITestSet.class);
                testSet.name("testSetName");
                testSet.status("Open");
                testSet.post();
                testSet.unLockObject();

with above code I am facing below exception while executing

com4j.ComException: 8004051b (Unknown error) : Required field <Project Name> can not be empty or SPACE filled. : .\invoke.cpp:517
    at com4j.Wrapper.invoke(Wrapper.java:166)
    at $Proxy16.post(Unknown Source)
    at main.main.main(main.java:53)
Caused by: com4j.ComException: 8004051b (Unknown error) : Required field <Project Name> can not be empty or SPACE filled. : .\invoke.cpp:517
    at com4j.Native.invoke(Native Method)
    at com4j.StandardComMethod.invoke(StandardComMethod.java:42)
    at com4j.Wrapper$InvocationThunk.call(Wrapper.java:340)
    at com4j.Task.invoke(Task.java:51)
    at com4j.ComThread.run0(ComThread.java:153)
    at com4j.ComThread.run(ComThread.java:134)
Pragati
  • 21
  • 1

0 Answers0