Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A fews smoke tests for Linux-Proc-Maps #1

Closed
wants to merge 2 commits into from

Conversation

melezhik
Copy link

@melezhik melezhik commented Dec 9, 2016

Hi @chazmcgarvey !

This is small test suite written on Sparrow - a blackbox testing / automation framework. I occasionally find some CPAN modules and write tests for them.

What the test does:

  • call format_maps_single_line with some hash input data and validate that it returns valid maps single line
  • call parse_maps_single_line with some maps single line and validate that it returns valid hash values
  • fork child process and pass it's PID to read_maps then validates it recognizes a pathname related to process forked ( sleep command )

PS if you like this test please merge in or if you have any questions feel free to ask. If you don't like the idea just close the PR, I will be ok with that. An example travis reports could be found here - https://travis-ci.org/melezhik/Linux-Proc-Maps/jobs/182714330

Alexey

@chazmcgarvey
Copy link
Owner

Hey Alexey,

I appreciate your taking the time to write these smoke tests. If nothing else it gave me the opportunity to take a look at Sparrow!

Two things:

  1. .travis.yml in this repo is actually autogenerated by Dist::Zilla::Plugin::TravisYML, so my author tools would clobber your changes! I'm very sorry that the file has no indication of that, but I've now submitted Add autogeneration_warning option SineSwiper/Dist-Zilla-TravisCI#41 to fix that.

  2. I think Sparrow is an interesting concept with broad application, but in this specific case I'm unsure about the idea of keeping these tests in a separate repo. One of the things I like about writing tests with Test::More and just keeping them in the same repo is that I can very easily write the tests and develop concurrently, and running the tests is as simple as "prove". So, I'm curious: what is your suggested workflow for maintaining these tests?

Thanks again!

@melezhik
Copy link
Author

HI Charles! I appreciate your feedback.

That' ok. At lease my MR has shown you that! )))

  1. ...

Ok, I see your points here. On " what is your suggested workflow for maintaining these tests?" Good question to ask. There is no formal answer to this. Sparrow tends to be more back box / integration testing tool. If think about Linux-Proc-Maps which deals with low level OS resources - it's easy to create an integration tests based on Travis - where you may "prepare" some complex environments for Linux-Proc-Maps ( running / killing various processes, so on ) with the help of Sparrow scripts.

@melezhik melezhik closed this Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants