English 中文(简体)
根据XML援引的推定
原标题:Specifiying invoation count from XML invocation
  • 时间:2012-05-16 17:54:54
  •  标签:
  • testng

我有一个现有的全国测试小组测试案例。 我想通过在几个深层同时处理测试案例来测试压力。 改变<代码>@ 测试通知

@Test(invocationCount = 100, threadPoolSize=10)

但是,我不想照搬原始案文(我希望把它作为功能检验)。 我倾向于在我的XML测试套案定义中确定援引。

作为周围的工作,我创造了一种新的检验标准,高的聘用率,而这一检验只是所谓的旧测试。 这种解决办法是可行的,但感到就像一个黑板。

最佳回答

作为周围的工作,我创造了一种新的检验标准,高的聘用率,而这一检验只是所谓的旧测试。 这种解决办法是可行的,但感到就像一个黑板。

这不是一种理想的解决办法,但它行之有效。

问题回答

页: 1 http://testng.org/doclava/vis/org/testng/IAnnotation Transformer.html” rel=“nofollow”

你们可以做事 在XML档案中,使用如下文script:

<test name="TestName" >
    <method-selectors>
            <method-selector>
                <script language="beanshell">
                <![CDATA[
                testngMethod.setInvocationCount(2);
                return true;
                ]]>
                </script>
            </method-selector>
    </method-selectors>
        <classes>
            <class name="testNG.test" />
        </classes>
</test>

因此,高于xml配置的变更将两次进行测试。





相关问题
Spring Dependency Injection with TestNG

Spring support JUnit quite well on that: With the RunWith and ContextConfiguration annotation, things look very intuitive @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "...

Servlet unit test

Currently I m using TestNG framework for testing application business logic, i added some Servlet classes recently. How do I unit test these Servlet classes in TestNg framework?

Getting black images with selenium.captureScreenshot

I m executing selenium tests with testng, that are started on a remote system with Selenium RC via hudson (with ssh connection). The remote system is windows xp with MKS Toolkit installed, hence ssh. ...

Is it possible to use the TestNG plugin with Netbeans 6.8?

I downloaded the TestNG NetBeans Plugin and tried to install it in my NetBeans 6.8. I m running NetBeans IDE 6.8 (Build 200912041610). When I click install, I get this message: Some plugins ...

Passing Object Parameters for TestNG methods?

Here is my situation. Before my tests are run, in the beforesuite, I instantiate a bunch of "environment objects" These objects get created based on my environment configuration file. It is my ...

TestNG multithreaded test with Spring @Transactional

I am using TestNG to test persistence Spring modules (JPA+Hibernate) using AbstractTransactionalTestNGSpringContextTests as a base class. All important parts @Autowired, @TransactionConfiguration, @...

热门标签