I released
Test::Alien over the holidays as a replacement for
Test::CChecker (which I also wrote). I believe it to be the best way to test Alien modules, either those based on
Alien::Base or even those that are not.
Brief history:
Prior to Test::CChecker there wasn't a really good way to test Alien modules without rolling your own test. And most of these self-rolled Alien tests are broken in one way or another. As with the intention with Alien::Base I thought it would be a good idea to fix the problem once in a module rather than having to fix it in every module that tries to implement an Alien (either with or without Alien::Base). Test::CChecker was a decent improvement over state of affairs. It leans heavily on ExtUtils::CBuilder. Unfortunately it does this via ExtUtils::CChecker which is designed to be run from a Makefile.PL or Build.PL to ensure capabilities of the environment. This is close enough to be useful for testing an Alien module, but it turns out there are lots of edge cases with dynamic libraries and FFI where it just breaks. I considered requesting features necessary in ExtUtils::CChecker or forking it privately within Test::CChecker, but there were some advantages to a totally new interface.
This Test::Alien was born. The main advantage is that it tests the Alien module in the ways that it will actually be used. That is, either as a dynamic library (via a static library) via XS, or as a dynamic library by FFI::Platypus. It also doesn't forget tool oriented Alien modules like Alien::gmake and Alien::patch by providing testing tools for those sort of Aliens. It will also automatically skip tests that it knows that it won't be able to do, like testing XS on a system that doesn't have a compiler. This is a useful thing if you have a system with a particular library already installed, and intend on using it with FFI::Platypus. You can write your tests to do this yourself, but again, doing this in every single Alien module rather than in one place is an error-prone proposition.
For now Test::Alien is my project, but I intend on eventually donating it to the Alien::Base team (as I have with Alien::patch and Alien::gmake).
Graham