1 / 24

Testowanie eXtremalne i narzędzia xUnit

Testowanie eXtremalne i narzędzia xUnit. M. Gabor , J. Nawrocki, B. Walter Instytut Informatyki Politechnika Poznańska. Rational Robot. Motywacje. xUnit. Plan. eXtreme Programming Testowanie jednostkowe - xUnit Testowanie akceptacyjne – Rational Robot Biblioteka VPoints.

Télécharger la présentation

Testowanie eXtremalne i narzędzia xUnit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testowanie eXtremalnei narzędzia xUnit M. Gabor, J. Nawrocki, B. Walter Instytut Informatyki Politechnika Poznańska Maciej Gabor, SCR 2002

  2. Rational Robot Motywacje xUnit Maciej Gabor, SCR 2002

  3. Plan • eXtreme Programming • Testowanie jednostkowe - xUnit • Testowanie akceptacyjne – Rational Robot • Biblioteka VPoints Maciej Gabor, SCR 2002

  4. eXtreme Programming Testowanie jednostkowe - xUnit Testowanie akceptacyjne – Rational Robot Biblioteka VPoints Plan Maciej Gabor, SCR 2002

  5. eXtreme Programing Testowanie Programowanie parami Ciągła integracja Refaktoryzacja Maciej Gabor, SCR 2002

  6. Plan • eXtreme Programming • Testowanie jednostkowe - xUnit • Testowanie akceptacyjne – Rational Robot • Biblioteka VPoints Maciej Gabor, SCR 2002

  7. Testy jednostkowe - xUnit • SUnit (Kent Beck) • JUnit • CPPUnit • PHPUnit • PerlUnit • DUnit • PythonUnit • PlSqlUnit • SchemeUnit • VbUnit • HttpUnit • DotNetUnit • EiffelUnit • PowerBuilderUnit Maciej Gabor, SCR 2002

  8. Testy jednostkowe - xUnit • Ramy implementowania przypadków testowych Przypadek testowy Przypadek testowy Maciej Gabor, SCR 2002

  9. Testy jednostkowe - JUnit public class MyTestCase extends TestCase { private Vector v; } public void setUp() { v=new Vector(); v.add(“String1”); v.add(“String2”); } public void testCapacity { assertTrue(v.size()==2); v.clear(); assertTrue(v.size()==0); } public void tearDown() { v=null; } Maciej Gabor, SCR 2002

  10. Testy jednostkowe - JUnit public class MyTestCase extends TestCase { private Vector v; } public void setUp() { v=new Vector(); v.add(“String1”); v.add(“String2”); } public void testCapacity { assertTrue(v.size()==2); v.clear(); assertTrue(v.size()==0); } public void tearDown() { v=null; } Maciej Gabor, SCR 2002

  11. Testy jednostkowe - JUnit public class MyTestCase extends TestCase { private Vector v; } public void setUp() { v=new Vector(); v.add(“String1”); v.add(“String2”); } public void testCapacity { assertTrue(v.size()==2); v.clear(); assertTrue(v.size()==0); } public void tearDown() { v=null; } Maciej Gabor, SCR 2002

  12. Testy jednostkowe - JUnit public class MyTestCase extends TestCase { private Vector v; } public void setUp() { v=new Vector(); v.add(“String1”); v.add(“String2”); } public void testCapacity { assertTrue(v.size()==2); v.clear(); assertTrue(v.size()==0); } public void tearDown() { v=null; } Maciej Gabor, SCR 2002

  13. Plan • eXtreme Programming • Testowanie jednostkowe - xUnit • Testowanie akceptacyjne – Rational Robot • Biblioteka VPoints Maciej Gabor, SCR 2002

  14. Rozpoczęcie zapisu Wykonanie akcji Punkty weryfikacji Zakończenie zapisu Testy akceptacyjne – Rational Robot • Zapis skryptów GUI ≈ assert (JUnit) Maciej Gabor, SCR 2002

  15. Rozpoczęcie zapisu Wykonanie akcji Punkty weryfikacji Zakończenie zapisu Testy akceptacyjne – Rational Robot • Zapis skryptów GUI Maciej Gabor, SCR 2002

  16. Plan • eXtreme Programming • Testowanie jednostkowe - xUnit • Testowanie akceptacyjne – Rational Robot • Biblioteka VPoints Maciej Gabor, SCR 2002

  17. Test Dziedziczy Korzysta xUnit VPoints Biblioteka VPoints Maciej Gabor, SCR 2002

  18. VPoint dla xUnit Maciej Gabor, SCR 2002

  19. WatchDog public class MyTest extends TestCase { public void testOperationDuration() { IWatchDog wd = Factory.createWatchDog(); wd.start(500); operations(); wd.stop(); } } Maciej Gabor, SCR 2002

  20. A2 A1 ... B B Kolejka Słownik • NewItem • ... • NewElem • ... Przydział_pamięci • New • ... First fit Globalne efekty uboczne Maciej Gabor, SCR 2002

  21.  Zajętość pamięci  Liczba elementów Kolejka Słownik • NewItem • ... • NewElem • ... A1 A2 B Przydział_pamięci • New • ... First fit Globalne efekty uboczne A2 A1 ... B B CzasNewElem Czas NewItem CzasNew Maciej Gabor, SCR 2002

  22. Praktyka • Funkcje pogrupowane w moduły • Przykładowy projekt • 180 godz. Kodowania • 29 godz. kodowania testów • < 17 % czasu • 32 dni pracy – 29 integracji kodu Maciej Gabor, SCR 2002

  23. Podsumowanie • eXtreme Programming • Narzędzia – xUnit i Rational Robot • Biblioteka VPoints Dziękuję za uwagę Maciej Gabor gabi@arni.pdi.net Maciej Gabor, SCR 2002

  24. IV Krajowa Konferencja Inżynierii Oprogramowania KKIO 2002 http://kkio.put.poznan.pl Hotel 500 Tarnowo Podgórne k. Poznania 15 – 18 października 2002 Maciej Gabor, SCR 2002

More Related