• window 用 fiddler,Mac 用 Charles

  • 这个 6、7K 并发说的是 rps(requests per second) 么?我发现我之前可能理解错了,我这到不了这么高。我的 Mac 用 locust 也试了下访问的百度,最高只有 350rps😂 也试了下 gatling,大概设置 2000 用户访问没问题。果然还是 Linux 做性能测试相对比较好。😂

  • 有空我再用 locust 试试看,比较下两者😀

  • 单机并发貌似也就 8k 左右,顶多到 1 万,再多应该撑不住了😅 jmeter 就比这个低多了吧

  • locust 和 gatling 的单机并发能力都比 LoadRunner/Jmeter 高,至于到底谁最高,这个就不清楚了。gatling 比 locust 的优势在于有相对完善的测试报告。

  • 应该是 scala-sdk 版本不对,我也遇到,选择 File → Project Structure... → Global Libraries,选中 - 号,把有问题的 scala-sdk-2.12.10 删掉,然后选择 + 号,添加 2.12.8 版本,最后 Apply 后,点 OK 保存。亲测使用 2.12.8 版本后,问题得到解决。

  • 测试工程师相关技能整理 at 2019年11月22日

    学习了,我后面补上~😆

  • 测试工程师相关技能整理 at 2019年11月22日

    现在不是都要求各种花里胡哨的么😾

  • 测试工程师相关技能整理 at 2019年11月22日

    苦涩难堪,嚼不动了已经😭

  • 测试工程师相关技能整理 at 2019年11月22日

    干到老,学到老😅

  • 测试工程师相关技能整理 at 2019年11月22日

    哈哈哈,点点点的测试大佬😂

  • 为什么我按照楼主步骤,反复试了几次,还是报错,完整日志如下:

     Information:2019/11/21, 10:02 PM - Compilation completed with 1 error and 0 warnings in 1s 271ms
    Error:scalac: Error: assertion failed: 
      no extension method found for:
      method /:(pathString: String)java.nio.file.Path
     Candidates:
    
     Candidates (signatures normalized):
     " 
         while compiling: /Users/aaa/IdeaProjects/Gatling/TestGatling/src/test/scala/IDEPathHelper.scala
            during phase: globalPhase=erasure, enteringPhase=refchecks
         library version: version 2.13.1
        compiler version: version 2.13.1
      reconstructed args: -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/tools.jar:/Users/aaa/IdeaProjects/Gatling/TestGatling/target/classes:/Users/aaa/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.1.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-reflect/srcs/scala-reflect-2.13.1-sources.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-library/srcs/scala-library-2.13.1-sources.jar:/Users/aaa/.m2/repository/io/gatling/highcharts/gatling-charts-highcharts/3.3.1/gatling-charts-highcharts-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/scala-library/2.12.10/scala-library-2.12.10.jar:/Users/aaa/.m2/repository/io/gatling/gatling-charts/3.3.1/gatling-charts-3.3.1.jar:/Users/aaa/.m2/repository/com/tdunning/t-digest/3.1/t-digest-3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-http-client/3.3.1/gatling-http-client-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-netty-util/3.3.1/gatling-netty-util-3.3.1.jar:/Users/aaa/.m2/repository/io/netty/netty-buffer/4.1.42.Final/netty-buffer-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-handler/4.1.42.Final/netty-handler-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-handler-proxy/4.1.42.Final/netty-handler-proxy-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-socks/4.1.42.Final/netty-codec-socks-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-resolver-dns/4.1.42.Final/netty-resolver-dns-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-resolver/4.1.42.Final/netty-resolver-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-dns/4.1.42.Final/netty-codec-dns-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-transport-native-epoll/4.1.42.Final/netty-transport-native-epoll-4.1.42.Final-linux-x86_64.jar:/Users/aaa/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.42.Final/netty-transport-native-unix-common-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-http2/4.1.42.Final/netty-codec-http2-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.26.Final/netty-tcnative-boringssl-static-2.0.26.Final.jar:/Users/aaa/.m2/repository/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar:/Users/aaa/.m2/repository/org/slf4j/slf4j-api/1.7.28/slf4j-api-1.7.28.jar:/Users/aaa/.m2/repository/com/typesafe/scala-logging/scala-logging_2.12/3.9.2/scala-logging_2.12-3.9.2.jar:/Users/aaa/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/aaa/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/aaa/.m2/repository/io/gatling/gatling-commons/3.3.1/gatling-commons-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/scala-reflect/2.12.10/scala-reflect-2.12.10.jar:/Users/aaa/.m2/repository/com/typesafe/config/1.4.0/config-1.4.0.jar:/Users/aaa/.m2/repository/io/suzaku/boopickle_2.12/1.3.1/boopickle_2.12-1.3.1.jar:/Users/aaa/.m2/repository/org/typelevel/spire-macros_2.12/0.16.2/spire-macros_2.12-0.16.2.jar:/Users/aaa/.m2/repository/com/softwaremill/quicklens/quicklens_2.12/1.4.12/quicklens_2.12-1.4.12.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.12/0.9.0/scala-java8-compat_2.12-0.9.0.jar:/Users/aaa/.m2/repository/com/eatthepath/fast-uuid/0.1/fast-uuid-0.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-app/3.3.1/gatling-app-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-core/3.3.1/gatling-core-3.3.1.jar:/Users/aaa/.m2/repository/com/typesafe/akka/akka-slf4j_2.12/2.5.26/akka-slf4j_2.12-2.5.26.jar:/Users/aaa/.m2/repository/org/simpleflatmapper/lightning-csv/8.0.3/lightning-csv-8.0.3.jar:/Users/aaa/.m2/repository/org/simpleflatmapper/sfm-util/8.0.3/sfm-util-8.0.3.jar:/Users/aaa/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.8.0/caffeine-2.8.0.jar:/Users/aaa/.m2/repository/org/checkerframework/checker-qual/2.10.0/checker-qual-2.10.0.jar:/Users/aaa/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.3/error_prone_annotations-2.3.3.jar:/Users/aaa/.m2/repository/io/pebbletemplates/pebble/3.1.0/pebble-3.1.0.jar:/Users/aaa/.m2/repository/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.12/1.1.2/scala-parser-combinators_2.12-1.1.2.jar:/Users/aaa/.m2/repository/com/github/scopt/scopt_2.12/3.7.1/scopt_2.12-3.7.1.jar:/Users/aaa/.m2/repository/io/gatling/jsonpath_2.12/0.7.0/jsonpath_2.12-0.7.0.jar:/Users/aaa/.m2/repository/net/sf/saxon/Saxon-HE/9.9.1-5/Saxon-HE-9.9.1-5.jar:/Users/aaa/.m2/repository/org/jodd/jodd-lagarto/5.0.13/jodd-lagarto-5.0.13.jar:/Users/aaa/.m2/repository/org/jodd/jodd-core/5.0.13/jodd-core-5.0.13.jar:/Users/aaa/.m2/repository/org/jodd/jodd-log/5.0.13/jodd-log-5.0.13.jar:/Users/aaa/.m2/repository/io/burt/jmespath-jackson/0.4.0/jmespath-jackson-0.4.0.jar:/Users/aaa/.m2/repository/io/burt/jmespath-core/0.4.0/jmespath-core-0.4.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-http/3.3.1/gatling-http-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-xml_2.12/1.2.0/scala-xml_2.12-1.2.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-jms/3.3.1/gatling-jms-3.3.1.jar:/Users/aaa/.m2/repository/javax/jms/javax.jms-api/2.0.1/javax.jms-api-2.0.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-jdbc/3.3.1/gatling-jdbc-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-redis/3.3.1/gatling-redis-3.3.1.jar:/Users/aaa/.m2/repository/net/debasishg/redisclient_2.12/3.10/redisclient_2.12-3.10.jar:/Users/aaa/.m2/repository/org/apache/commons/commons-pool2/2.6.0/commons-pool2-2.6.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-graphite/3.3.1/gatling-graphite-3.3.1.jar:/Users/aaa/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar:/Users/aaa/.m2/repository/io/gatling/gatling-recorder/3.3.1/gatling-recorder-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-swing_2.12/2.1.1/scala-swing_2.12-2.1.1.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/Users/aaa/.m2/repository/org/json4s/json4s-jackson_2.12/3.6.7/json4s-jackson_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-core_2.12/3.6.7/json4s-core_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-ast_2.12/3.6.7/json4s-ast_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-scalap_2.12/3.6.7/json4s-scalap_2.12-3.6.7.jar:/Users/aaa/.m2/repository/com/thoughtworks/paranamer/paranamer/2.8/paranamer-2.8.jar:/Users/aaa/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar:/Users/aaa/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-http/4.1.42.Final/netty-codec-http-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-common/4.1.42.Final/netty-common-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-transport/4.1.42.Final/netty-transport-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec/4.1.42.Final/netty-codec-4.1.42.Final.jar:/Users/aaa/.m2/repository/com/typesafe/akka/akka-actor_2.12/2.5.26/akka-actor_2.12-2.5.26.jar
      last tree to typer: TypeTree(class ListBuffer)
           tree position: line 4 of /Users/aaa/IdeaProjects/Gatling/TestGatling/src/test/scala/Recorder.scala
                tree tpe: scala.collection.mutable.ListBuffer[() => Unit]
                  symbol: class ListBuffer in package mutable
       symbol definition: class ListBuffer[A] extends AbstractBuffer[A] with SeqOps[A,scala.collection.mutable.ListBuffer,scala.collection.mutable.ListBuffer[A]] with StrictOptimizedSeqOps[A,scala.collection.mutable.ListBuffer,scala.collection.mutable.ListBuffer[A]] with ReusableBuilder[A,List[A]] with IterableFactoryDefaults[A,scala.collection.mutable.ListBuffer] with DefaultSerializable (a ClassSymbol)
          symbol package: scala.collection.mutable
           symbol owners: class ListBuffer
               call site: object IDEPathHelper in package <empty>
    == Source file context for tree position ==
         1 import io.gatling.recorder.GatlingRecorder
         2 import io.gatling.recorder.config.RecorderPropertiesBuilder
         3 
         4 object Recorder extends App {
         5 
         6   val props = new RecorderPropertiesBuilder()
         7     .simulationsFolder(IDEPathHelper.recorderSimulationsDirectory.toString)
    java.lang.AssertionError: assertion failed: 
      no extension method found for:
      method /:(pathString: String)java.nio.file.Path
     Candidates:
    
     Candidates (signatures normalized):
     " 
         while compiling: /Users/aaa/IdeaProjects/Gatling/TestGatling/src/test/scala/IDEPathHelper.scala
            during phase: globalPhase=erasure, enteringPhase=refchecks
         library version: version 2.13.1
        compiler version: version 2.13.1
      reconstructed args: -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/lib/tools.jar:/Users/aaa/IdeaProjects/Gatling/TestGatling/target/classes:/Users/aaa/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.13.1.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-reflect/srcs/scala-reflect-2.13.1-sources.jar:/Users/aaa/.ivy2/cache/org.scala-lang/scala-library/srcs/scala-library-2.13.1-sources.jar:/Users/aaa/.m2/repository/io/gatling/highcharts/gatling-charts-highcharts/3.3.1/gatling-charts-highcharts-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/scala-library/2.12.10/scala-library-2.12.10.jar:/Users/aaa/.m2/repository/io/gatling/gatling-charts/3.3.1/gatling-charts-3.3.1.jar:/Users/aaa/.m2/repository/com/tdunning/t-digest/3.1/t-digest-3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-http-client/3.3.1/gatling-http-client-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-netty-util/3.3.1/gatling-netty-util-3.3.1.jar:/Users/aaa/.m2/repository/io/netty/netty-buffer/4.1.42.Final/netty-buffer-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-handler/4.1.42.Final/netty-handler-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-handler-proxy/4.1.42.Final/netty-handler-proxy-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-socks/4.1.42.Final/netty-codec-socks-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-resolver-dns/4.1.42.Final/netty-resolver-dns-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-resolver/4.1.42.Final/netty-resolver-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-dns/4.1.42.Final/netty-codec-dns-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-transport-native-epoll/4.1.42.Final/netty-transport-native-epoll-4.1.42.Final-linux-x86_64.jar:/Users/aaa/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.42.Final/netty-transport-native-unix-common-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-http2/4.1.42.Final/netty-codec-http2-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.26.Final/netty-tcnative-boringssl-static-2.0.26.Final.jar:/Users/aaa/.m2/repository/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar:/Users/aaa/.m2/repository/org/slf4j/slf4j-api/1.7.28/slf4j-api-1.7.28.jar:/Users/aaa/.m2/repository/com/typesafe/scala-logging/scala-logging_2.12/3.9.2/scala-logging_2.12-3.9.2.jar:/Users/aaa/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/aaa/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/aaa/.m2/repository/io/gatling/gatling-commons/3.3.1/gatling-commons-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/scala-reflect/2.12.10/scala-reflect-2.12.10.jar:/Users/aaa/.m2/repository/com/typesafe/config/1.4.0/config-1.4.0.jar:/Users/aaa/.m2/repository/io/suzaku/boopickle_2.12/1.3.1/boopickle_2.12-1.3.1.jar:/Users/aaa/.m2/repository/org/typelevel/spire-macros_2.12/0.16.2/spire-macros_2.12-0.16.2.jar:/Users/aaa/.m2/repository/com/softwaremill/quicklens/quicklens_2.12/1.4.12/quicklens_2.12-1.4.12.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.12/0.9.0/scala-java8-compat_2.12-0.9.0.jar:/Users/aaa/.m2/repository/com/eatthepath/fast-uuid/0.1/fast-uuid-0.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-app/3.3.1/gatling-app-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-core/3.3.1/gatling-core-3.3.1.jar:/Users/aaa/.m2/repository/com/typesafe/akka/akka-slf4j_2.12/2.5.26/akka-slf4j_2.12-2.5.26.jar:/Users/aaa/.m2/repository/org/simpleflatmapper/lightning-csv/8.0.3/lightning-csv-8.0.3.jar:/Users/aaa/.m2/repository/org/simpleflatmapper/sfm-util/8.0.3/sfm-util-8.0.3.jar:/Users/aaa/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.8.0/caffeine-2.8.0.jar:/Users/aaa/.m2/repository/org/checkerframework/checker-qual/2.10.0/checker-qual-2.10.0.jar:/Users/aaa/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.3/error_prone_annotations-2.3.3.jar:/Users/aaa/.m2/repository/io/pebbletemplates/pebble/3.1.0/pebble-3.1.0.jar:/Users/aaa/.m2/repository/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.12/1.1.2/scala-parser-combinators_2.12-1.1.2.jar:/Users/aaa/.m2/repository/com/github/scopt/scopt_2.12/3.7.1/scopt_2.12-3.7.1.jar:/Users/aaa/.m2/repository/io/gatling/jsonpath_2.12/0.7.0/jsonpath_2.12-0.7.0.jar:/Users/aaa/.m2/repository/net/sf/saxon/Saxon-HE/9.9.1-5/Saxon-HE-9.9.1-5.jar:/Users/aaa/.m2/repository/org/jodd/jodd-lagarto/5.0.13/jodd-lagarto-5.0.13.jar:/Users/aaa/.m2/repository/org/jodd/jodd-core/5.0.13/jodd-core-5.0.13.jar:/Users/aaa/.m2/repository/org/jodd/jodd-log/5.0.13/jodd-log-5.0.13.jar:/Users/aaa/.m2/repository/io/burt/jmespath-jackson/0.4.0/jmespath-jackson-0.4.0.jar:/Users/aaa/.m2/repository/io/burt/jmespath-core/0.4.0/jmespath-core-0.4.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-http/3.3.1/gatling-http-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-xml_2.12/1.2.0/scala-xml_2.12-1.2.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-jms/3.3.1/gatling-jms-3.3.1.jar:/Users/aaa/.m2/repository/javax/jms/javax.jms-api/2.0.1/javax.jms-api-2.0.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-jdbc/3.3.1/gatling-jdbc-3.3.1.jar:/Users/aaa/.m2/repository/io/gatling/gatling-redis/3.3.1/gatling-redis-3.3.1.jar:/Users/aaa/.m2/repository/net/debasishg/redisclient_2.12/3.10/redisclient_2.12-3.10.jar:/Users/aaa/.m2/repository/org/apache/commons/commons-pool2/2.6.0/commons-pool2-2.6.0.jar:/Users/aaa/.m2/repository/io/gatling/gatling-graphite/3.3.1/gatling-graphite-3.3.1.jar:/Users/aaa/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar:/Users/aaa/.m2/repository/io/gatling/gatling-recorder/3.3.1/gatling-recorder-3.3.1.jar:/Users/aaa/.m2/repository/org/scala-lang/modules/scala-swing_2.12/2.1.1/scala-swing_2.12-2.1.1.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar:/Users/aaa/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/Users/aaa/.m2/repository/org/json4s/json4s-jackson_2.12/3.6.7/json4s-jackson_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-core_2.12/3.6.7/json4s-core_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-ast_2.12/3.6.7/json4s-ast_2.12-3.6.7.jar:/Users/aaa/.m2/repository/org/json4s/json4s-scalap_2.12/3.6.7/json4s-scalap_2.12-3.6.7.jar:/Users/aaa/.m2/repository/com/thoughtworks/paranamer/paranamer/2.8/paranamer-2.8.jar:/Users/aaa/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar:/Users/aaa/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar:/Users/aaa/.m2/repository/io/netty/netty-codec-http/4.1.42.Final/netty-codec-http-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-common/4.1.42.Final/netty-common-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-transport/4.1.42.Final/netty-transport-4.1.42.Final.jar:/Users/aaa/.m2/repository/io/netty/netty-codec/4.1.42.Final/netty-codec-4.1.42.Final.jar:/Users/aaa/.m2/repository/com/typesafe/akka/akka-actor_2.12/2.5.26/akka-actor_2.12-2.5.26.jar
      last tree to typer: TypeTree(class ListBuffer)
           tree position: line 4 of /Users/aaa/IdeaProjects/Gatling/TestGatling/src/test/scala/Recorder.scala
                tree tpe: scala.collection.mutable.ListBuffer[() => Unit]
                  symbol: class ListBuffer in package mutable
       symbol definition: class ListBuffer[A] extends AbstractBuffer[A] with SeqOps[A,scala.collection.mutable.ListBuffer,scala.collection.mutable.ListBuffer[A]] with StrictOptimizedSeqOps[A,scala.collection.mutable.ListBuffer,scala.collection.mutable.ListBuffer[A]] with ReusableBuilder[A,List[A]] with IterableFactoryDefaults[A,scala.collection.mutable.ListBuffer] with DefaultSerializable (a ClassSymbol)
          symbol package: scala.collection.mutable
           symbol owners: class ListBuffer
               call site: object IDEPathHelper in package <empty>
    == Source file context for tree position ==
         1 import io.gatling.recorder.GatlingRecorder
         2 import io.gatling.recorder.config.RecorderPropertiesBuilder
         3 
         4 object Recorder extends App {
         5 
         6   val props = new RecorderPropertiesBuilder()
         7     .simulationsFolder(IDEPathHelper.recorderSimulationsDirectory.toString)
        at scala.reflect.internal.SymbolTable.throwAssertionError(SymbolTable.scala:170)
        at scala.tools.nsc.transform.ExtensionMethods.$anonfun$extensionMethod$1(ExtensionMethods.scala:53)
        at scala.tools.nsc.transform.ExtensionMethods.extensionMethod(ExtensionMethods.scala:48)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.preEraseNormalApply(Erasure.scala:1097)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.preEraseApply(Erasure.scala:1199)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.preErase(Erasure.scala:1209)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:1328)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:988)
        at scala.reflect.internal.Trees$ValDef.$anonfun$transform$4(Trees.scala:407)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2625)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:32)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:24)
        at scala.reflect.internal.Trees$ValDef.transform(Trees.scala:406)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:1340)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:988)
        at scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2614)
        at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2612)
        at scala.reflect.internal.Trees$Template.transform(Trees.scala:517)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.$anonfun$transform$1(TypingTransformers.scala:47)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2625)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:32)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:1364)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:988)
        at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2587)
        at scala.reflect.internal.Trees$ClassDef.$anonfun$transform$2(Trees.scala:335)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2625)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:32)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:24)
        at scala.reflect.internal.Trees$ClassDef.transform(Trees.scala:334)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:1364)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:988)
        at scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2614)
        at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2612)
        at scala.reflect.internal.Trees$PackageDef.$anonfun$transform$1(Trees.scala:316)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2625)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:32)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:24)
        at scala.reflect.internal.Trees$PackageDef.transform(Trees.scala:316)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.$anonfun$transform$2(TypingTransformers.scala:49)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2625)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:32)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anon$4.transform(Erasure.scala:1364)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1374)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:162)
        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:36)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:452)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
        at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1506)
        at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1490)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
        at scala.tools.nsc.Global$Run.compile(Global.scala:1614)
        at xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
        at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
        at xsbt.CompilerInterface.run(CompilerInterface.scala:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
        at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:40)
        at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:30)
        at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:83)
        at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:26)
        at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
    
  • SoloPi v0.9.2 版本更新 at 2019年11月14日
    仅楼主可见
  • 我试了下,把代码写错,也是能扫描出 failed 的。你那边执行的命令是什么?我这执行的是:

    sonar-scanner -Dsonar.projectKey=test -Dsonar.sources=.
    

    再重新看下你的配置过程,查一下哪里有出错没。

  • 你这个扫描结果是 pass 的了😂

  • 我看你这个截图是执行成功了,可以 sonar-scanner -e 或 sonar-runner -e 查下具体日志,看下哪里有抛出 exception 没。

  • 已体验,期待开发 API~

  • 是更稳定还是效率更高呢?

  • 可以再建多线程,通过传入不同的 deviceId 来操作手机

  • 可以的,自己改成想要的样子就行了

  • 或者直接用 u2 的 watcher 监听,可以通过 watchers.watched 设置 True/False 打开或关闭监听

    # 监听弹窗
        def watcher(self, driver):
            try:
                driver.watcher("继续安装").when(text="继续安装").click(text="继续安装")
                driver.watcher("允许").when(text="允许").click(text="允许")
                driver.watcher("始终允许").when(text="始终允许").click(text="始终允许")
                driver.watcher("确定").when(text="确定").click(text="确定")
                driver.watcher("确认").when(text="确认").click(text="确认")
                driver.watchers.watched = True
            except Exception as e:
                print(e)
    
  • 稳~😉

  • 大佬好!程哥

  • 如果需要连续执行多条 adb shell 命令,则可以采用命令adb shell "cmd1 && cmd2 && cmd3",如下:

    import subprocess
    
    cmd = 'adb shell "cd sdcard && cd tmp && pwd"'
    
    def adb_shell(cmd):
        p = subprocess.getstatusoutput(cmd)
        return p
    
    result = adb_shell(cmd)
    print(result)
    

    执行结果:
    (0, '/sdcard/tmp')

  • 请问这个是多设备并行 run 还是串行 run 的测试用例?