[[oktatas:programozás:java:java_teszteles:testng|< TestNG]] ====== TestNG - Tesztek figyelmen kívül hagyása ====== * **Szerző:** Sallai András * Copyright (c) 2023, Sallai András * Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC BY-SA 4.0]] * Web: https://szit.hu ===== Metódus figyelmen kívül hagyása ===== Az **@Test(enabled=false)** hatására a teszt látszik a többi között, de mindig sikerre fut. public class TestPelda { @Test(enabled=false) public void testMethod1() {} @Test public void testMethod1() {} } ===== Ignore annotáció ===== Az @Ignore hatására a tesztek között nem jelenik meg: @Ignore public class TestPelda { @Test public void testMethod1() {} @Test public void testMethod1() {} } ===== Ignore annotáció metódusokkal ===== A **@Ignore** annotációnak megegyezik a hatása a **@Test(enabled=false)** beállítással. public class TestPelda { @Ignore @Test public void testMethod1() {} @Test public void testMethod1() {} }