leetgo icon indicating copy to clipboard operation
leetgo copied to clipboard

Automation test

Open j178 opened this issue 2 years ago • 4 comments

We need an automation test tool to ensure basic command are functional during each commit.

j178 avatar Jan 29 '23 03:01 j178

What type of automation do you want? Unit Test or Integration Test?

For the Unit Test, we can just use the original go testing.

Or we can use a testing framework like testify.

For commands testing, we can use something like pseudo-terminal to test them. As I knew, there are some repositories trying to do this like go-expect, pty.

acehinnnqru avatar Feb 03 '23 14:02 acehinnnqru

Thanks for the information, that's very useful.

I think I'm gonna go with testing to do some basic stdout output and file creation assertion, not planning to write very thorough unit tests.

j178 avatar Feb 04 '23 04:02 j178

Maybe you can list the packages you would like to add tests. I can pick some.

acehinnnqru avatar Feb 04 '23 05:02 acehinnnqru

Thank you for your help. I haven't thought about this issue clearly yet, and I don't think I'll work on it very soon.

j178 avatar Feb 04 '23 15:02 j178