How to check the cross-platform command line client?

I want to run integration tests on the command line, which is supported on several platforms.

For example, if I write a mercurial plugin and want to test it from the top level, how can I create a test that will work on Windows, Linux, and OS X?

Alternatively, should you just write tests that use the highest level functions in your code and just perform basic sanity checks in the final program?

+4
source share
2 answers

We write tests like these in Groovy or Python. Since the execution time of Python and Groovy is highly platform dependent, you should be able to execute commands for all three operating systems. For each platform, you may need to change several parameters, but you can perform an OS check and install them at the beginning of the script. There are frameworks that simplify tests, such as JUnit and Spock for Groovy and Robot for Python, but they simply abstract the usual framework. I would just start. It is agile to try the simplest thing that could work.

, . . , (, ), Smoke () () .

+3

Mercurial - Mercurial. , .

+2

Source: https://habr.com/ru/post/1524208/


All Articles