Re: Tests failing
[email protected] (Doug Bell)
| Newsgroups | perl.cpan.testers.discuss |
|---|---|
| Message-ID | <[email protected]> |
> On Jul 25, 2018, at 4:07 AM, Kai Schwarz <[email protected]> wrote: > > Hey guys, > > after having reviewed all PrePAN community concerns, I uploaded yesterday our Module to PAUSE/CPAN. Now we got the 1st CPAN Testers Result Report where I can see the tests failing. > http://www.cpantesters.org/cpan/report/38a33670-8f54-11e8-8fb1-ef5133556b3f > > Our module is available as WebService::Hexonet::Connector, source code can be found at https://github.com/hexonet/perl-sdk. > > I am not sure why it fails, but maybe it is not possible to open urls on the test servers? This could be then the reason why the response breaks expected test results. Of course we need to review this to return at least an alternative error response. Just my 2 cents.. > > Can someone help us here or at least provide some useful information? Another thing to take a look at is the Test::RequiresInternet module (https://metacpan.org/pod/Test::RequiresInternet <https://metacpan.org/pod/Test::RequiresInternet>) or Test2::Require::Internet (https://metacpan.org/pod/Test2::Require::Internet <https://metacpan.org/pod/Test2::Require::Internet>), which will help ensure that the machine you're testing on can access the Internet addresses the test requires. You may also want to consider mocking out the actual connection to the Internet using a module like Mock::MonkeyPatch (https://metacpan.org/pod/Mock::MonkeyPatch <https://metacpan.org/pod/Mock::MonkeyPatch>) or Test::MockObject (https://metacpan.org/pod/Test::MockObject <https://metacpan.org/pod/Test::MockObject>). That way your tests can run on a machine that doesn't connect to the Internet. Finally, this test report has a lot of "uninitialized value" warnings, which leads me to believe you might not be checking the HTTP response or validating your data well enough. You could consider logging some output to STDERR when testing, and Log::Any (https://metacpan.org/pod/Log::Any <https://metacpan.org/pod/Log::Any>) is a nice, lightweight solution for that, though the `diag` function from Test::More is also great for this. With enough information in the report, it becomes much easier to figure out what went wrong without having to contact the tester about it. Good luck! Doug Bell [email protected]
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE05l/4Z4+wsRVWe5G+fbjUgnpGMYFAltZKBkACgkQ+fbjUgnp GMZMGhAArz/hX6Zk6nFvDQRPGiFHwUkpnQH8P7Dwgtj/LorW2KyIMY5sN9HgTQLY Xq8Y7TrRubV0gKtGcF8NXh81N0nVFNjWjULhZbYat90Dy9o/SSBb6miNBWkB9yO9 xty/vUeCLeW1Ms1RzqDV+YLPvdlyvAf8vq6hwCiiwKQaXTyTC8KTSGLVM0z61NZa Wx0nMD9w585oo3jMRRSnkQki5ITYyyNe5fZEBVNtKEndOHfN6Lg5OlH0rqPcLBOY LEnyh3ENG7gCM+hvY3UWzxF69AY/9fKUVLycYXh9yAet8eicZLHcFoCcdnoCcdBM AO0ju3sEl1qcTk1J7gNiX8Hpn7TIqH+vduCTjv0caBwpjbmG8gym+fTMPlJS282w a1DAVqW/HWxXRShYspxcwdF7ObsFxooXzDCLtR3KbQ5qALYkt8ZheqLxrqPQZNkl DrJ84se0EdUDPJH5NmUMYGKDrzZRIbZrR0NPsU4ch6FuPbP26I6h1m5luSQCayRv sJhH99vDXU1VBsnB0ZAFCV6s/67zMPmtjmS349PSQehmO6N2kFfgkeJ9LTlemBMu 1JfLZdavcGueEOgyZv/daUOcYZAQKEd40MTKhYA1MNaWFWYtqKWC2eiqX2GISWGH h8K+1l1FwT4lJ2INBuo7TiE6wM/f8ODpxwES/nqDwUi7Wp3wEnM= =01Rm -----END PGP SIGNATURE-----