2

Com4J を使用して ALM に新しいテストセットを追加したいと考えています。次のコードを試しました:

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();

上記のコードでは、実行中に以下の例外に直面しています

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)
4

0 に答える 0