Skip to content
Somkiat Puisungnoen edited this page Aug 9, 2019 · 11 revisions

SonarQube with Maven

Jenkins Plugins

Selenium

File node.json

{
  "capabilities":
  [
    {
      "browserName": "chrome",
      "maxInstances": 20,
      "seleniumProtocol": "WebDriver"
    }
  ]
}

Run

$java -jar selenium-server-standalone-4.0.0-alpha-2.jar -role node  -hub http://10.10.99.82:4444/grid/register/ -nodeConfig node.json

Robotframework

Jenkins Pipeline

node {
   stage('pull-code') {  
       git 'https://github.com/up1/workshop-java-web-tdd.git'
   }
   stage('build') {
       sh label: '', script: 'mvnw clean test'
       junit 'target/surefire-reports/*.xml'
   }
   stage('code-coverage') {  
       sh label: '', script: 'mvnw cobertura:cobertura'
       cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/target/site/cobertura/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
   }
   stage('war') {  
       sh label: '', script: 'mvnw package -DskipTests'
   }
   stage('deploy') {
       build 'deploy_new'
   }
   stage('robot') {  
       parallel Chrome: {
            stage ('Chrome'){
            }
        }, Firefox: {
            stage ('Firefox'){
            }
        }, IE: {
            stage ('IE'){
            }
        }
   }
   stage('jmeter') {  
   }
}
Clone this wiki locally