Skip to content

Instantly share code, notes, and snippets.

@anandbagmar
anandbagmar / setupAppsOnMac.sh
Last active November 30, 2023 16:08
Install basic software on a new Mac machine
# Install brew:
/bin/bash -c "$(curl --tlsv1.2 -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew doctor
brew tap homebrew/cask-versions
# install ohmyzsh
ZSH= sh -c "$(curl --tlsv1.2 -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
/*
put this in your POM file
<dependencies>
<dependency>
<groupId>com.applitools</groupId>
<artifactId>eyes-images-java3</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
@anandbagmar
anandbagmar / MyTest.java
Last active August 1, 2018 01:59
Soft Assertion usage example
import org.testng.asserts.SoftAssert;
public class MyTest {
private SoftAssert soft;
public void sampleMethod() {
soft = BaseTest.getSoftAssert();
soft.assertTrue(false, "This is a Soft Assertion usage example");
}
}
@anandbagmar
anandbagmar / BaseTest.java
Last active January 22, 2022 05:45
Soft Assertion implementation using TestNG
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.testng.IHookCallBack;
import org.testng.IHookable;
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.asserts.SoftAssert;
public class BaseTest implements IHookable {
String testName = null;