My Jacoco Maven Plugin POM config

Adding it here so I can refer to it in the future.


<jacoco.version>0.8.2</jacoco.version>
        <min.branch.coverage>0.95</min.branch.coverage>
        <min.line.coverage>0.95</min.line.coverage>


<plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>default-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>${min.branch.coverage}</minimum>
                                        </limit>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>LINE</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>${min.line.coverage}</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

My .bash_profile

Don’t know why I never added it here, so doing it now.


alias ll="ls -al"
alias src="cd ~/workspace/"
alias ap="cd ~/workspace/git/antonperez/"

alias readyapi=”/Applications/ReadyAPI-2.5.0.app/Contents/java/app/bin/ready-api.sh”

performGitOperations() {
git fetch –all
git checkout $1
git reset –hard origin/$1
git clean -fd
}

copom() {
echo “[———- START ———-]”
if [ “$2” = “all” ]; then
echo “–>> blwebdriver <<–” cd ~/workspace/git/qa/blwebdriver performGitOperations $1 echo “–>> blutilities <<–” cd ~/workspace/git/qa/blutilities performGitOperations $1 fi echo “–>> blpages <<–” cd ~/workspace/git/qa/blpages performGitOperations $1 echo “–>> blcucumber <<–”
cd ~/workspace/git/qa/blcucumber
performGitOperations $1
echo “[———- DONE ———-]”
}

 

git-all() {
git fetch –all
git checkout $1
git reset –hard origin/$1
git clean -fd
}

if [ -f $(brew –prefix)/etc/bash_completion ]; then
. $(brew –prefix)/etc/bash_completion
fi

gitPS1(){
gitps1=$(git branch 2>/dev/null | grep ‘*’)
gitps1=”${gitps1:+ (${gitps1/#\* /})}”
echo “$gitps1”
}

PS1=’\u@\h:\w$(gitPS1)$ ‘

Gatling How-To: Installation and Execution on OS X

This is here for my own reference, but may help others.  I’m a software craftsman on a Mac, and I use Homebrew whenever possible.  So, the info here relates to that.

Prerequisite: Java must be installed (i.e. brew cask install java).

      1. Install Scala via Homebrew: brew install scala
        • Optionally: Install Scala plugin in IntelliJ
      2. Download from https://gatling.io/download/
      3. Extract and place the folder in /usr/local/Cellar/gatling/gatling-charts-highcharts-bundle-2.3.1
      4. Navigate to gatling folder
      5. Set the directory settings in /conf/gatling.conf
      6. Create a test.scala file in /user-files/simulations
      7. Go to the terminal and run /usr/local/Cellar/gatling/gatling-charts-highcharts-bundle-2.3.1/bin/gatling.sh
      8. To run from IntelliJ via Maven:
        gatling:execute -Dgatling.simulationClass=TestSimulation -f pom.xml

Install sqlcmd on Mac OS X

In case you need to run SQL Server scripts from your Mac, do the following to install (NOTE: I use HomeBrew.):

    • From the terminal, type:

brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
ACCEPT_EULA=y brew install --no-sandbox msodbcsql mssql-tools

    • You should see something like in the screenshot. Type “YES” if prompted and be on your way.
    • Once done, type:

sqlcmd