在与生产代码相同的项目中设置Gatling性能测试

时间:2017-10-14 13:04:09

标签: scala sbt gatling project-structure

我想将我们的性能Gatling测试从一个单独的项目(现在它们)转移到与源代码和常规测试相同的项目中。

理想情况下,我希望有以下结构:

root-project
|
|--src
    |
    |--main
    |   |
    |   |--scala
    |   |--resources
    |--test
    |   |
    |   |--scala
    |   |--resources
    |--performance
    |   |
    |   |--scala
    |   |--resources

性能测试将在src/performance之下,您应该能够像以下那样运行它们:

sbt gatling:test

有没有人这样做过?我应该如何构建我的SBT构建文件?

谢谢

1 个答案:

答案 0 :(得分:0)

使用Gatling sbt plugin:它提供了您正在寻找的内容,包括运行gatling:test等命令的功能,以及在项目结构中指定Gatling模拟的位置。更多信息在链接文档中,有一个简单的项目演示如何配置和使用插件here