I saw this on my Twitter feed and can’t help but post it here! ?
404 – Can’t find it
401 – You’re not getting in
403 – Look, you’re in but you’re not allowed
500 – We screwed up
400 – You screwed up
200 – All is fine, carry on
I saw this on my Twitter feed and can’t help but post it here! ?
404 – Can’t find it
401 – You’re not getting in
403 – Look, you’re in but you’re not allowed
500 – We screwed up
400 – You screwed up
200 – All is fine, carry on
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)$ ‘
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).
gatling:execute -Dgatling.simulationClass=TestSimulation -f pom.xml
In case you need to run SQL Server scripts from your Mac, do the following to install (NOTE: I use HomeBrew.):
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
ACCEPT_EULA=y brew install --no-sandbox msodbcsql mssql-tools
sqlcmd
Just in case you need to assert that a WebElement doesn’t exist, here’s a code snippet that you can use.
Java
public int isElementPresent(String xpath) { return driver.findElements(By.xpath(xpath)).size(); }
@Then("^I expect to see the link On the page$") public void iExpectToSeeTheLinkOnThePage() { assertTrue(demoPage.isElementPresent() > 1); }