Skip to content

Invent a way to test external programs integration #1206

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

Closed
gracjan opened this issue Mar 14, 2016 · 0 comments
Closed

Invent a way to test external programs integration #1206

gracjan opened this issue Mar 14, 2016 · 0 comments

Comments

@gracjan
Copy link
Contributor

gracjan commented Mar 14, 2016

haskell-mode invokes many external programs. There is a need to have integration tests for such interactions so that we can ensure smooth cooperation. Integration tests is a category of tests that is completely absent from our test suite right now.

Requirements:

  1. Integration tests help with development. It should be easier to write an integration test than to do the testing manually.
  2. Integration tests should ensure working with multiple versions of external program.
  3. Integration tests should run separately from unit tests so that unit testing development does not suffer in speed or issues.
  4. Integration tests should run fast.
  5. Integration tests should be deterministic and not suffer from environment misconfiguration.

Ideas:

  1. Use el-mock and stop right before the external program is executed.
  2. Create substitute programs as shell scripts, for example hasktags-mock.sh and setup haskell-mode to invoke those.
  3. Install real programs and run those.

Discussion:

Item 1. cuts a bit too short although it might be useful in some scenarios. Item 2. is a great one because it does not depend on what happens to be installed in the $PATH and ensures that old versions of external executable will still work. Item 3. on the other hand is great to ensure that the newest executable will still work with haskell-mode.

I guess we will use each method depending on circumstances.

@gracjan gracjan changed the title Invent a way to tests external programs integration Invent a way to test external programs integration Mar 14, 2016
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

No branches or pull requests

1 participant