@@ -0,0 +1,2567 @@
+/**%0A * Created with IntelliJ IDEA.%0A * User: jhasmanyquiroz%0A * Date: 11/19/15%0A * Time: 6:23 PM%0A * To change this template use File %7C Settings %7C File Templates.%0A */%0Apackage runner;%0Aimport common.CommonMethods;%0Aimport cucumber.api.Scenario;%0Aimport cucumber.api.CucumberOptions;%0Aimport cucumber.api.java.After;%0Aimport cucumber.api.testng.AbstractTestNGCucumberTests;%0Aimport org.apache.log4j.Logger;%0Aimport org.openqa.selenium.OutputType;%0Aimport org.openqa.selenium.TakesScreenshot;%0Aimport org.openqa.selenium.WebDriverException;%0Aimport org.testng.annotations.AfterMethod;%0Aimport org.testng.annotations.AfterTest;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport org.testng.annotations.BeforeTest;%0A%0Aimport static framework.BrowserManager.getInstance;%0A%0A@CucumberOptions(%0A        plugin = %7B%22pretty%22, %22html:target/cucumber%22, %22json:target/cucumber.json%22%7D,%0A        glue=%7B%22steps%22%7D,%0A        features = %7B%22src/test/resources/features%22%7D,%0A        //features = %7B%22src/test/resources/features/login.feature%22%7D,%0A        monochrome = true)%0A%0Apublic class RunCukesTest extends AbstractTestNGCucumberTests %7B%0A%0A    private static Logger log = Logger.getLogger(%22RunCukesTest%22);%0A    public static boolean isLogin;%0A%0A    @BeforeTest%0A    public void beforeExecution() %7B%0A        try %7B%0A            System.out.println(%22************************GLOBAL HOOK - BEFORE: %22+isLogin);%0A            CommonMethods.logIn();%0A            isLogin = true;%0A        %7Dcatch (Exception e) %7B%0A            log.error(%22Unable to login before execution%22);%0A        %7D%0A    %7D%0A%0A    @AfterTest%0A    public void afterExecution() %7B%0A        try %7B%0A            System.out.println(%22************************GLOBAL HOOK - AFTER: %22+isLogin);%0A            CommonMethods.logOut();%0A            isLogin = false;%0A        %7D catch (Exception e) %7B%0A            log.error(%22Unable to logout after execution%22, e);%0A        %7D finally %7B%0A            getInstance().quitBrowser();%0A        %7D%0A    %7D%0A%0A    @BeforeMethod%0A    public static void beforeScenario() %7B%0A        System.out.println(%22Starting Feature: %22+isLogin);%0A    %7D%0A%0A    @AfterMethod%0A    public static void afterScenario() %7B%0A        System.out.println(%22Ending Feature: %22+isLogin);%0A    %7D%0A%0A    @After%0A    public void embedScreenShot(Scenario scenario) %7B%0A        try %7B%0A            byte%5B%5D screenshot = ((TakesScreenshot)getInstance().getDriver()).getScreenshotAs(OutputType.BYTES);%0A            scenario.embed(screenshot, %22image/png%22);%0A        %7D catch (WebDriverException somePlatformsDontSupportScreenshots) %7B%0A            System.err.println(somePlatformsDontSupportScreenshots.getMessage());%0A        %7D%0A    %7D%0A%7D

Add the class Runner