无法在Testng xml中调用两次相同的类。请参阅以下示例以供参考。我们设计了一种基于组件的方法,需要再次调用一些方法。当我尝试这种方法时,我得到“java.lang.IllegalStateException:Circular dependency”错误
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<suite guice-stage="DEVELOPMENT" name="suite name">
<Listeners>
<Listener class-name="TestListeners.class" />
</Listeners>
<test name="SampleTest" verbose="2">
<classes>
<class name="ClassOne">
<methods>
<include name="methodone" />
<include name="methodtwo" />
</methods>
</class>
<class name="ClassTwo">
<methods>
<include name="clickPODSubsystem" />
<include name="clickWorkWithCustomerAccountsLinks" />
</methods>
</class>
<class name="ClassOne">
<methods>
<include name="methodthree" />
<include name="methodfour" />
</methods>
</class>
</classes>
</test>
</suite>