java - reuse cache in all junit test cases -


we have multiple test cases loads data cache , run test case .the test cases runs fine when ran test cases once takes lot of time cache loaded every time each test case.is there way load cache once , use cache across test cases.

one way of doing put test cases in 1 class defeats purpose result difficult analyze(there around 5-10 test method in each class , there around 30 test classes report gets generated large , not organized). tried using test suite cache getting shutdown after each test case runs them 1 one.

you can create abstract class base class test cases. cache should initialized class , stored in static member. tests should use cache.

alternative solution implement custom test runner manage cache. have mark test cases need cache using annotation @runwith , pass test runner class there.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -