【问题标题】:Using Gatling for functional testing使用 Gatling 进行功能测试
【发布时间】:2017-12-14 13:55:27
【问题描述】:

我想进入测试自动化领域,并且我已经看到了可以进行功能测试的 selenium。我还看到了用于性能测试和负载/压力测试的 gatling。我想知道是否可以使用 gatling 进行功能测试?

【问题讨论】:

    标签: selenium testing gatling


    【解决方案1】:

    这是他们文档中的功能规范示例:

    class GatlingFunSpecExample extends GatlingHttpFunSpec { 
    
      val baseURL = "http://example.com"
      override def httpConf = super.httpConf.header("MyHeader", "MyValue")
    
      spec {
        http("Example index.html test")
          .get("/index.html")
          .check(pageHeader.exists)
      }
    
    }
    
    object GatlingFunSpecExample {
      def pageHeader = css("h1")
    }
    

    文档链接: https://gatling.io/docs/2.3/general/functional_specs/

    【讨论】:

      最近更新 更多