我有一個測試方法像身體一樣如何查找是否所有assertTrue通過或任何人失敗?
{
assertTrue("Login failed", somecondition);
assertTrue("Page not browsing", somecondition);
assertTrue("Button not found", somecondition);
//here I want to found whether any assertTrue failed or all are passed
}
我怎樣才能做到這一點?
什麼這工作已經 - 如果任何斷言失敗,你會得到一個' AssertionError'。否則,你不會。 – 2013-04-24 08:07:52