TestNG テスト メソッドから例外がスローされた後に実行されるアスペクトがあります。私は自分のspectjメソッドにTestメソッド名を入れたいと思っています。
これについて何か考えはありますか?以下の私のコードサンプルを見つけてください:
側面:
pointcut publicCall(): call(public * *(..));
after() throwing (AssertionError e): publicCall() {
logger.debug("Assertion Error thrown");
System.out.println("Threw an exception: " + e);
}
テスト:
@Test
public void testScenarioOne(){
logger.debug("From Scenario One Test");
Assert.assertEquals(true, false);
}