小编Ard*_*sco的帖子

`autodetect':未检测到已知的ORM

无法使用清理数据database_cleaner.rb; 在运行测试时抛出以下问题.

/Users/prashanth_sams/.rvm/gems/ruby-2.0.0-p598/gems/database_cleaner-1.3.0/lib/database_cleaner/base.rb:147:in"autodetect":未检测到已知的ORM!ActiveRecord,DataMapper,Sequel,MongoMapper,Mongoid,Moped或CouchPotato,Redis还是Ohm加载?(DatabaseCleaner :: NoORMDetected)

在此输入图像描述

spec_helper.rb

ENV["RAILS_ENV"] ||= 'test'

require File.expand_path("../config/environment", __FILE__)
require 'rspec/rails'

Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

RSpec.configure do |config|

  config.mock_with :rspec

  config.use_transactional_fixtures = false


  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.color = true

  Selenium::Application.reload_routes!

end
Run Code Online (Sandbox Code Playgroud)

database_cleaner.rb

require 'database_cleaner'

DatabaseCleaner.strategy = :truncation

RSpec.configure do |config|
  config.use_transactional_fixtures = false
  config.before :each do
    DatabaseCleaner.start
  end
  config.after :each do
    DatabaseCleaner.clean
  end …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails capybara ruby-on-rails-3

11
推荐指数
2
解决办法
1601
查看次数

什么maven插件用于JMeter?jmeter-maven-plugin或chronos-jmeter-maven-plugin?

我需要设置由CI系统自动触发的性能测试.为此,我想使用JMeter,因为一些脚本和经验已经存在,我想将它与Maven结合起来.

在我研究一个合理的插件时,我发现存在两个插件:

  1. jmeter-maven-plugin:http: //wiki.apache.org/jmeter/JMeterMavenPlugin
  2. chronos-jmeter-maven-plugin:http: //mojo.codehaus.org/chronos/chronos-jmeter-maven-plugin/usage.html

哪一个更好用?两者似乎都在维持并正在开发中.有这方面的经验吗?甚至配置也类似.

我很乐意得到一些提示,以帮助我决定,而不是玩两个插件几天.

jmeter maven jmeter-maven-plugin

10
推荐指数
1
解决办法
7451
查看次数

Chromedriver 不适用于 Alpine 基础 docker 映像

我有一个应用程序,它使用基于 alpine 的图像,并且我在给定目录(/usr/bin/chromedriver/linux64/2.45/chromedriver)中有具有 755 权限的 chrome 驱动程序。

我得到以下错误:

chromedriver-docker-example_1  | 2019-03-20 05:05:50.316 ERROR 21 --- [ null to remote] org.openqa.selenium.os.OsProcess         : org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/bin/chromedriver/linux64/2.45/chromedriver" (in directory "."): error=2, No such file or directory)
Run Code Online (Sandbox Code Playgroud)

可以请任何人帮忙吗?

webdriver selenium-chromedriver selenium-webdriver docker alpine-linux

7
推荐指数
1
解决办法
4859
查看次数

Jmeter JSON 路径断言

以下是我的 JSON 响应数据,我需要使用以下响应进行断言。我尝试了很多方法来编写 JSON 路径和期望值。总是断言失败。我想要的是请帮助写下以下数据的路径和期望值

{
    "statusCode": 200,
    "statusMessage": "Success",
    "errorMessage": "",
    "responseData": {
        "id": 15,
        "userName": "partner@tarento.com",
        "firstName": "tarento",
        "lastName": "test1",
        "phoneNumber": "1234567812",
        "email": "partner@tarento.com",
        "password": "",
        "city": "",
        "agentList": [
            {
                "id": 37,
                "userName": "Rahul.antonyRaj@tarento.com",
                "firstName": "Sanjay",
                "lastName": "rahul",
                "phoneNumber": "7411269480",
                "email": "Rahul.antonyRaj@tarento.com",
                "password": "",
                "active": true
            },
            {
                "id": 68,
                "userName": "jinesh.sumedhan@tareto.com",
                "firstName": "jinesh",
                "lastName": "sumedhan",
                "phoneNumber": "9400993826",
                "email": "jinesh.sumedhan@tareto.com",
                "password": "",
                "active": true
            },
            {
                "id": 108,
                "userName": "a.sanjayrahul@gmail.com",
                "firstName": "Rahul",
                "lastName": "Antony",
                "phoneNumber": "9994590241",
                "email": …
Run Code Online (Sandbox Code Playgroud)

performance json jmeter jmeter-plugins

6
推荐指数
1
解决办法
1万
查看次数

如何让Maven仅运行JMeter测试(没有其他生命周期)

我们正在使用,maven-jmeter-plugin并且已经设置了jmeter配置文件。当我运行mvn -Pjmeter verify各种Maven生命周期时,它们都不需要运行。

如何仅运行JMeter测试?

<profile>
  <id>jmeter</id>
  <build>
    <plugins>
      <plugin>
        <groupId>com.lazerycode.jmeter</groupId>
        <artifactId>jmeter-maven-plugin</artifactId>
        <version>${jmeter.version}</version>
        <executions>
          <execution>
            <id>jmeter-tests</id>
            <phase>verify</phase>
            <goals>
              <goal>jmeter</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <testResultsTimestamp>false</testResultsTimestamp>
        </configuration>
      </plugin>
    </plugins>
  </build>
</profile>
Run Code Online (Sandbox Code Playgroud)

jmeter maven jmeter-plugins jmeter-maven-plugin

5
推荐指数
1
解决办法
1443
查看次数

Jmeter远程执行 - 有没有办法从ant提供全局属性?

在我的Jmeter脚本中,我使用属性函数ie $ {__ P(varName,2)}来指定运行时的变量值.

从CMD执行脚本时 - 我可以使用-JvarName指定属性值(即-JvarName = 5),对于远程执行,我可以使用CMD中的-GvarName(即-GvarName = 5)指定值.

现在我正在尝试使用ant build运行这个Jmeter脚本
,它在单台PC上工作正常.(即runremote ="false")但是当我尝试在多台PC上远程执行时(即runremote ="true")它没有采取属性标签中提供的值(即<property name="varName" value="5"/>)是否有任何方法可以从ant提供全局属性. ?? 就像我们使用参数-G从CMD那样做.

<target name="JMeter" depends="start"> 
  <taskdef name="jmeter"    
        classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask">    
  </taskdef> 
  <jmeter jmeterhome="${jmeter_Home}"   
         resultlog="${report.output.location}/Report/${property.file}/${START_TIME}/JMete??rSummeryResults.jtl" 
         runremote="true"> 
      <testplans dir="../JMeter" includes="*.jmx" /> 
      <property name="USERS" value="${thread.users}" /> 
      <property name="SITE_ID" value="${site.id}" /> 
      <property name="FOLDER_ID" value="${folder.id}" /> 
      <property name="FILE_PATH" value="${file.upload.path}" /> 
  </jmeter> 
Run Code Online (Sandbox Code Playgroud)

ant jmeter jmeter-plugins

5
推荐指数
1
解决办法
352
查看次数

使用Maven插件设置JMeter属性

我正在使用JMeter的Maven插件(http://jmeter.lazerycode.com/).

在我的JMeter测试计划中,我定义了各种属性,例如hostName,threadCount等.

如果我从命令行使用标准的JMeter程序,我会指定如下属性:

jmeter -n -t mytest.jmx -JhostName=www.example.com -JthreadCount=5
Run Code Online (Sandbox Code Playgroud)

由于Maven JMeter插件是通过以下命令执行的:

mvn verify
Run Code Online (Sandbox Code Playgroud)

如何传递属性值?命令:

mvn verify -JhostName=www.example.com -JthreadCount=5
Run Code Online (Sandbox Code Playgroud)

似乎没有用.我一定错过了一些明显的东西

properties jmeter maven jmeter-maven-plugin

4
推荐指数
1
解决办法
7314
查看次数

Jmeter的HTTP缓存管理器和HTTP Cookie管理器有什么用途?

What is the use of HTTP Cache Manager and HTTP Cookie Manager 
Run Code Online (Sandbox Code Playgroud)

以及如果启用/禁用在每次迭代中将其清除的选项,其性能如何?

jmeter

4
推荐指数
1
解决办法
1万
查看次数

如何在Jmeter中处理发布方法以进行负载测试?

我想在应用程序服务器上使用jmeter执行负载测试后方法。我在应用程序服务器上使用jmeter多次执行负载测试以获取请求。我不知道如何在jmeter中处理post方法进行负载测试?

POST HTTP请求:

POST的内容类型为“ application / x-www-form-urlencoded”

    请求:http:// localhost:8080 / configserver / execute?command = Login

POST参数:

    数据= {
      “ email”:“ user@domain.com”,
      “密码”:“ 12345”
    }

输出:

    {
      “ status_code”:“ 0”,
      “状态消息”: ””,
      “结果”:{
        “ user_id”:“ 1”,
        “ session_token”:“ abcd”
      }
    }

jmeter jmeter-plugins

3
推荐指数
1
解决办法
2万
查看次数

jmeter-graph-maven-plugin 可用的图表类型?

我正在编写一个 JMeter 套件来运行在 Jenkins 之上并使用jmeter-graph-maven-plugin生成图表。

测试正在使用jmeter-maven-plugin 执行并生成 jmeter-graph 插件期望的相应 *.jtl 文件。

当我在 pom.xml 上声明它们时,我想知道可以通过jmeter-graph-maven-plugin生成的所有类型的图:

<graph>
    <pluginType>ThreadsStateOverTime</pluginType>
    <width>800</width>
    <height>600</height>
    <outputFile>${project.build.directory}/jmeter/results/ThreadsStateOverTime.png</outputFile>
</graph>
Run Code Online (Sandbox Code Playgroud)

是否有所有可能的综合清单 我可以使用的条目?

谢谢,

尼尔

jmeter load-testing maven jenkins jmeter-maven-plugin

3
推荐指数
1
解决办法
1381
查看次数

硒如何获得警报警报消息

嗨,我正在使用以下方法检索警报消息数据,但是失败

Alert alert = driver.switchTo().alert();
        String ss1=alert.getText();
Run Code Online (Sandbox Code Playgroud)

它显示以下错误消息。

Popup present/Not : true
FAILED: Login
org.openqa.selenium.NoAlertPresentException: No alert is present (WARNING: The server
       did not provide any stacktrace information)
Command duration or timeout: 2.25 seconds
Build info: version: '2.23.0', revision: '17137', time: '2012-06-07 15:43:04'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', 
java.version:     '1.7.0_17'
Driver info: driver.version: RemoteWebDriver
Session ID: 0c684096-46e6-4f00-8434-af866eb29746
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458)
at …
Run Code Online (Sandbox Code Playgroud)

testing selenium selenium-webdriver

2
推荐指数
1
解决办法
7527
查看次数

有条件地执行JMeter Maven插件

我试图弄清楚如何有条件地执行我的JMeter性能测试计划.我想让我的Jenkins CI作业执行它,但是当开发人员运行时mvn clean install我不想让下面的插件运行.关于如何修改我的pom.xml以有条件地运行以下插件的任何想法?

Maven POM.xml JMeter插件:

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
        <artifactId>jmeter-maven-plugin</artifactId>
        <version>1.8.1</version>
        <executions>
         <execution>
          <id>jmeter-tests</id>
          <phase>verify</phase>
          <goals>
           <goal>jmeter</goal>
          </goals>
         </execution>
        </executions>
        <configuration>
         <testFilesDirectory>${project.basedir}/src/test/jmeter</testFilesDirectory>
         <ignoreResultFailures>true</ignoreResultFailures>
         <testResultsTimestamp>false</testResultsTimestamp>
        </configuration>
       </plugin>
       <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>xml-maven-plugin</artifactId>
    <version>1.0</version>
    <executions>
     <execution>
      <phase>verify</phase>
      <goals>
       <goal>transform</goal>
      </goals>
     </execution>
    </executions>
    <configuration>
     <transformationSets>
      <transformationSet>
       <dir>${project.build.directory}/jmeter/results</dir>
       <stylesheet>${project.basedir}/src/test/resources/jmeter-results-detail-report_21.xsl</stylesheet>
       <outputDir>${project.build.directory}/jmeter/results</outputDir>
       <fileMappers>
        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
         <pattern>(.*?)\s(.*?)</pattern>
         <replacement>$1$2</replacement>
         <replaceAll>true</replaceAll>
        </fileMapper>
        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
         <targetExtension>.html</targetExtension>
        </fileMapper>
       </fileMappers>
      </transformationSet>
     </transformationSets>
    </configuration>
   </plugin>
   <plugin>
      <groupId>ch.fortysix</groupId>
      <artifactId>maven-postman-plugin</artifactId>
      <version>0.1.2</version>
      <executions>
       <execution>
        <id>send a mail</id>
        <phase>install</phase>
        <goals>
         <goal>send-mail</goal>
        </goals>
        <inherited>false</inherited>
        <configuration>
         <from>admin@test.com</from>
         <subject>Load Test …
Run Code Online (Sandbox Code Playgroud)

java jmeter maven jenkins jmeter-maven-plugin

2
推荐指数
1
解决办法
1996
查看次数

如何使用开源工具捕获进程cpu,内存利用率

我想在一段时间内捕获我的应用程序进程的CPU,内存,线程数,以分析是否有任何进程使用更多的CPU,内存消耗.我们怎样才能实现这一目标.

performancecounter jmeter performance-testing

2
推荐指数
1
解决办法
7572
查看次数