'Infinitest'에 해당되는 글 1건

  1. 2008/05/16 What is Infinitest for TDD? (9)
What is Infinitest?

Infinitest is a continuous JUnit test runner designed to facilitate Test Driven Development. It
helps you get the most out of TDD by reducing your feedback cycle from minutes to seconds.

Infinitest 는 테스트기반의 개발을 하기 위해서 를 용이하게 하기 위해서 지속적으로 JUnit test를 실행하게 설계 되었다. 수분에서 수초까지 피드백 주기를 줄여주는 TDD로 부터 가장 중요한 것을 얻을수 있도록 해준다.

Using Infinitest

When Infinitest first launches, it runs any test that extends from
junit.framework.TestCase or has methods that have the org.junit.Test
annotation. After that, Infinitest will run the test again if it, or one of it's dependencies, changes.
Changes to direct and indirect dependencies will trigger a test run. Only the minimal set of tests
which depend on those changed files will be run.

첫번째로 Infinitest 어플리케이션이 실행될때 junit.framework.TestCase를 상속한 클래스나 org.junit.Test annotation을 찾아서 모두 실행을 한다. 그 이후에는 테스트 또는 그것에 의존하는 것들이 변경되면 테스트를 다시 실행을 한다. 직접,간접적으로 의존하는 것들의 변경되는 경우 테스트를 자동으로 실행을 한다.  변경된 파일에 의존하는 테스트들의 최소한의 셋만 실행이 될 것이다.

Test Driven Development
Infinitest is made with the Test Driven Developer in mind. You'll find yourself keeping your
hands on the keyboard, in the flow, as Infinitest runs your tests for you with each change.
Infinitest will act as a virtual pair programmer...keeping your honest and helping you take small
steps.

Refactoring
Refactoring is easy with Infinitest. The bar should always stay green. If the bar turns red, you
made a mistake! Back up and try again.
Refreshing The Graph
If you find yourself needing to run all of your tests from Infinitest, you can rebuild the
dependency graph by hitting the reload button. This will rebuild the dependency graph and
re-run all of your tests.

Stopping the tests
If you need to temporarily stop Infinitest from running your tests, you can hit the stop
button. This will prevent Infinitest from running tests after changes occur. When you resume
running tests (by hitting the button again), the entire test suite will be run.

Configuring Infinitest

Filtering Tests

You may have tests in your classpath that you don't want Infinitest to run. These tests can be
filtered out by creating a file in the working directory of your project named
infinitest.filters. It should contain one regular expression per line. Any class names
(not file names) that match any regular expressions in that file will not be run. For example:
org\.myproject\.acceptance\..*
.*\$.*
will filter out all the classes in the com.myproject.acceptance package, and any inner
classes (which always contain a $).

ex) 내가 진행하는 프로젝트인 경우는 서버환경에 따라서 테스트가 실패할수 있는 테스트는 IntegrationTest를 suffix에 붙여서 사용한다. 그래서 다음과 같이 파일을 만들어서 넣어주면 Infinitest 어플리케이션이 알아서 exclude를 하고 실행을 한다.

* 파일 이름 : infinitest.filters
* 파일 내용
com\.nhn\.community\..*IgnoreTest
com\.nhn\.community\..*IntegrationTest
com\.naver\.blog\..*IgnoreTest
com\.naver\.blog\..*IntegrationTest
.*\$.*

간단후기~

모든 테스트가 실행될때 보이는 하단에 progressive bar가 중독성있네요.

Infinitest 사용을 해보니 편하고 재미도 있습니다. 코드 개발을 하다가 보면, 테스트 돌리는 것도 귀찬은 작업중의 하나인데, 자동(trigger)으로 해주니 좋습니다요!
Posted by ologist
 TAG , ,
이전버튼 1 이전버튼

블로그 이미지
ologist

공지사항

Yesterday171
Today52
Total34,795

달력

 « |  » 2012.02
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

최근에 받은 트랙백

글 보관함