Software Testing Life Cycle — STLC

Requirement Analysis

Reviewing JMeter

1. Install Jenkins on cloud

Prerequisites

  1. EC2 Instance
  • With Internet Access
  • Security Group with Port 8080 open for internet

2. What is your greatest strength?

package com.beam.utils;

import com.beam.framework.exception.FrameworkRunTimeException;
import org.testng.*;

import java.io.IOException;
import java.util.List;

import java.util.Properties;
import java.util.function.Predicate;



public class MethodInterceptor implements IMethodInterceptor {

private static final ObjectLogger LOG = new ObjectLogger(org.apache.log4j.Logger.getLogger(MethodInterceptor.class));

private static final String BROWSER_EXCLUDED = "browserExcluded";
public static final Properties prop = new Properties();
private static final String PROPERTIES_FILE = "web-tests-resource.properties";


static {
try {
prop.load(MethodInterceptor.class.getClassLoader().getResourceAsStream(PROPERTIES_FILE));
} catch (IOException e) {
throw new FrameworkRunTimeException("Unable to find and load: " + PROPERTIES_FILE);
}
}

@Override
public List<IMethodInstance> intercept(List<IMethodInstance> testMethods, ITestContext context) {
Predicate<IMethodInstance> isBrowserExcluded = (MethodInstance) -> {
if(context.getCurrentXmlTest().getParameter(BROWSER_EXCLUDED) == null) return false;
return context.getCurrentXmlTest().getParameter(BROWSER_EXCLUDED)
.equalsIgnoreCase(prop.getProperty("test.browser"));
};
boolean isTestRemoved = testMethods.removeIf(isBrowserExcluded);
testMethods.stream()
.map(IMethodInstance::getMethod)
.forEach(method -> method.setIgnoreMissingDependencies(isTestRemoved));

return testMethods;
}

}
this is the commit for not running tests based on test environment

TELL ME ABOUT YOURSELF

Rahul

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store