Skip to content

Instantly share code, notes, and snippets.

@sng2c
Last active December 31, 2015 14:29
Show Gist options
  • Save sng2c/8000955 to your computer and use it in GitHub Desktop.
Save sng2c/8000955 to your computer and use it in GitHub Desktop.
Test::Continuous Quick Guide

Test::Continuous Quick Guide

참조

설치

Test::Continuous(0.73버전) 는 'self' 모듈에 의존성이 있습니다. 슬프게도, 'self' 모듈은 펄 5.17.6 버전 이상에서는 작동하지 않습니다.

그래서 제가 'self' 모듈에 대한 의존성을 제거하는 패치를 했습니다. 저장소는 https://github.com/sng2c/Test-Continuous 이구요.

패치된 버전은 아래와 같이 설치할 수 있습니다.

$ cpanm git@github.com:sng2c/Test-Continuous.git

사용방법

.pm파일과 .t파일간에 관계를 만들어 줘야 합니다.

  • lib/MyClass/SubClass.pm (MyClass::SubClass) 라면
  • t/myclass-subclass.t 으로 이름을 지어줍니다.

그리고 아래와 같이 실행하면 됩니다.

$ autoprove -l

더 자세히

처음에는, 모든 .t파일을 실행합니다. 다음부터는, 바뀌는 .pm과 .t파일을 탐지하여 연관이 있는 .t파일들을 실행합니다.

OSX에서 작업중이고, Growl과 'Log::Dispatch::MacGrowl' 모듈이 설치되어 있다면, 테스트 결과를 알림으로 받을 수 있습니다.

아마도 0.74버전부터는, 'self'모듈 의존성이 수정될겁니다.

Test::Continuous Quick Guide

References

Install

Test::Continuous(v0.73) has dependency with 'self' module. Unfortunately, 'self' does not work on perl 5.17.6+.

So I patched by removing the dependency with 'self' and made it working on 5.17.6+. The repository is https://github.com/sng2c/Test-Continuous.

You can install Test::Continuous by doing like below.

$ cpanm git@github.com:sng2c/Test-Continuous.git

Using

You need to make relationship between .pm and .t files.

  • When, lib/MyClass/SubClass.pm (MyClass::SubClass)
  • Then, t/myclass-subclass.t

And try this

$ autoprove -l

More details

At first time, it runs every .t files. And next time, it detects changed .pm and .t files and runs .t files which are related.

If you are working on OSX, and have installed Growl and 'Log::Dispatch::MacGrowl', you are notifying results of testings.

Since v0.74 maybe, dependencies with 'self' problem will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment