Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save He-Pin/7870df1d966de50b175c to your computer and use it in GitHub Desktop.

Select an option

Save He-Pin/7870df1d966de50b175c to your computer and use it in GitHub Desktop.

Revisions

  1. @groovybayo groovybayo revised this gist Feb 1, 2013. 1 changed file with 60 additions and 1 deletion.
    61 changes: 60 additions & 1 deletion step-by-step-gatling-idea.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ Have [SBT plugin][sbt-plugin] installed
    ## Begin

    - [Create a new project][create-project] in IDEA ( File > New Project ...)
    - __Make sure you select a maven module__
    - __Make sure you select a maven module__

    ![create project](http://www.screencast.com/t/znOaXf1s "create project")

    @@ -36,6 +36,65 @@ __Engine.scala__ - run this to execute existing simulations
    [Gatling IDE integration](https://github.com/excilys/gatling/wiki/Ide-integration "Gatling IDE Integration")


    ## Troubleshooting

    When creating the archetype, even though IDEA says the __repository__ is optional, it is important you specify the one for the gatling archetype. This is because gatling archetype is not hosted on maven central and if you fail to provide the URL (http://repository.excilys.com/content/groups/public), you will end up with error like

    Downloading:
    http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml
    Downloaded:
    http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml
    (701 B at 2.7 KB/sec)
    [INFO]
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO]
    ------------------------------------------------------------------------
    [INFO]
    [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @
    standalone-pom >>>
    [INFO]
    [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @
    standalone-pom <<<
    [INFO]
    [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @
    standalone-pom ---
    [INFO] Generating project in Batch mode
    [INFO] Archetype defined by properties
    Downloading:
    http://repo.maven.apache.org/maven2/com/excilys/ebi/gatling/highcharts/gatling-highcharts-maven-hetype/1.3.0/gatling-highcharts-maven-archetype-1.3.0.jar
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO]
    ------------------------------------------------------------------------
    [ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-archetype-plugin:2.2:generate
    (default-cli) on project standalone-pom: The desired archetype does
    not exist
    (com.excilys.ebi.gatling.highcharts:gatling-highcharts-maven-archetype:1.3.0)
    -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with
    the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions,
    please read the following articles:
    [ERROR] [Help 1]
    http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


    ## For command line lovers

    You can also generate the archetype from the command line directly using

    mvn archetype:generate \
    -DarchetypeCatalog=http://repository.excilys.com/content/groups/public/archetype-catalog.xml

    and then import it as a maven module from within IntelliJ. A longer way to archieve the same thing :)


    [create-project]: http://www.screencast.com/t/znOaXf1s
    [add-archetype]: http://www.screencast.com/t/pIOlMOvQzsi
  2. @groovybayo groovybayo created this gist Feb 1, 2013.
    44 changes: 44 additions & 0 deletions step-by-step-gatling-idea.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    # Step by step guide to setting up IDEA to write gatling simulations

    ## Prerequisites:
    Have [SBT plugin][sbt-plugin] installed

    ## Begin

    - [Create a new project][create-project] in IDEA ( File > New Project ...)
    - __Make sure you select a maven module__

    ![create project](http://www.screencast.com/t/znOaXf1s "create project")


    - [Add the gatling archetype][add-archetype] by clicking __Add archetype...__ on the next screen (if you don't already have it)

    - groupId: __com.excilys.ebi.gatling.highcharts__
    - artifactId: __gatling-highcharts-maven-archetype__
    - version: __1.4.2__
    - repository: __http://repository.excilys.com/content/groups/public__

    ![add archetype](http://www.screencast.com/t/pIOlMOvQzsi "add archetype")

    - Select the newly create archetype and click next
    - Click [Finish button][finish-create] to complete project creation

    ![finish project](http://www.screencast.com/t/LFu9DgEJxE "finish project")

    If all goes well, the project will be set up and ready to use

    __Recorder.scala__ - run this to launch the gatling recorder to record simulations

    __Engine.scala__ - run this to execute existing simulations


    ## Reference
    [Gatling IDE integration](https://github.com/excilys/gatling/wiki/Ide-integration "Gatling IDE Integration")



    [create-project]: http://www.screencast.com/t/znOaXf1s
    [add-archetype]: http://www.screencast.com/t/pIOlMOvQzsi
    [finish-create]: http://www.screencast.com/t/LFu9DgEJxE
    [sbt-plugin]: http://plugins.jetbrains.com/plugin/?idea&pluginId=5007