@Test public void testLogSahiCommandExection() throws Exception { try { Utils.executeAndGetProcess(new String[]{"testcommand", "arg1", "arg2"}); } catch (Exception e) { } assertLastLine(logFile, "SAHI", LogLevel.DEBUG, "SAHI command execution: [[testcommand, arg1, arg2]]"); }
@Before("execution(* net.sf.sahi.util.Utils.execute*(..))") public void logSahiCommandExection(JoinPoint joinPoint) { getLogger(joinPoint).debug("SAHI command execution: {}", printArgs(joinPoint, true)); }
SahiCommandExecutionAspect extends BaseSakuliAspect { @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") public void logSahiCommandExection(JoinPoint joinPoint) { getLogger(joinPoint).debug("SAHI command execution: {}", printArgs(joinPoint, true)); } }
SahiCommandExecutionAspect extends BaseSakuliAspect { @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") public void logSahiCommandExection(JoinPoint joinPoint) { getLogger(joinPoint).debug("SAHI command execution: {}", printArgs(joinPoint, true)); }  }
SahiCommandExecutionAspect extends BaseSakuliAspect { @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") public void logSahiCommandExection(JoinPoint joinPoint) { getLogger(joinPoint).debug("SAHI command execution: {}", printArgs(joinPoint, true)); }  @Around("execution(* net.sf.sahi.util.Utils.getCommandTokens(..)) && args(commandString)") String[] getCommandTokens(ProceedingJoinPoint joinPoint, String commandString); @AfterThrowing(pointcut = "execution(* net.sf.sahi.util.Utils.execute*(..))", throwing = "error") void catchSahiCommandExcecutionErrors(JoinPoint joinPoint, Exception error); @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") void logSahiCommandExection(JoinPoint joinPoint); }
SahiCommandExecutionAspect extends BaseSakuliAspect { @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") public void logSahiCommandExection(JoinPoint joinPoint) { getLogger(joinPoint).debug("SAHI command execution: {}", printArgs(joinPoint, true)); }  @Around("execution(* net.sf.sahi.util.Utils.getCommandTokens(..)) && args(commandString)") String[] getCommandTokens(ProceedingJoinPoint joinPoint, String commandString); @AfterThrowing(pointcut = "execution(* net.sf.sahi.util.Utils.execute*(..))", throwing = "error") void catchSahiCommandExcecutionErrors(JoinPoint joinPoint, Exception error); @Before("execution(* net.sf.sahi.util.Utils.execute*(..))") void logSahiCommandExection(JoinPoint joinPoint);  }