资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

ngrinder测试工具注意事项

1、下载源码

https://github.com/naver/ngrinder/releases
ngrinder测试工具注意事项

目前创新互联公司已为上千多家的企业提供了网站建设、域名、虚拟空间、网站托管、服务器托管、企业网站设计、博爱网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

2、导入idea

3、修改pom.xml文件:

net.sf.grinder
            grinder
            3.9.1

4、源码出现报错修改:


import org.ngrinder.infra.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Dynamic creation of {@link PerfTestService} depending on the cluster enable or disable.
 *
 * @author JunHo Yoon
 * @since 3.1
 */
@Configuration
@Profile("production")
@EnableScheduling
@EnableTransactionManagement
@EnableAspectJAutoProxy
public class PerfTestServiceConfig implements ApplicationContextAware {

    @Autowired
    private Config config;

    private ApplicationContext applicationContext;

    /**
     * Create PerTest service depending on cluster mode.
     *
     * @return {@link PerfTestService}
     */
    @Bean(name = "perfTestService")
    public PerfTestService perfTestService() {
        if (config.isClustered()) {
            return applicationContext.getAutowireCapableBeanFactory().createBean(ClusteredPerfTestService.class);
        } else {
            return applicationContext.getAutowireCapableBeanFactory().createBean(PerfTestService.class);
        }
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }
}

顺利启动成功

ngrinder测试工具注意事项

打包命令:
-DskipTests,不执行测试用例,但编译测试用例类生成相应的class文件至target/test-classes下。
-Dmaven.test.skip=true,不执行测试用例,也不编译测试用例类。
一 使用maven.test.skip,不但跳过单元测试的运行,也跳过测试代码的编译。
mvn package -Dmaven.test.skip=true


网页名称:ngrinder测试工具注意事项
URL地址:http://cdkjz.cn/article/psedgd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220