awesome-gocui / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
350 stars 39 forks source link

Build Testing approach using tcell simulation screen #88

Closed lawrencegripper closed 3 years ago

lawrencegripper commented 3 years ago

Related issue

86

Describe

This is WIP looking at building a simple to use integration testing approach for gocui. The aim is to allow input and assertion about the resulting screen content.

Todo

mjarkk commented 3 years ago

Oh i'm just thinking of something wouldn't it be nice if we have tests for the examples?
If we have those users know how to write tests for their gocui programs and we can make our cd/ci stronger.

And can you add testing capabilities to the readme features section?

lawrencegripper commented 3 years ago

Yeah sounds good to me, I'll add a set of tests to one of the examples then reference to this from the docs showing how to run tests.

Playing around with how/what to expose, tests still look a bit busy so might add a few helper methods to make them nicer to write.

lawrencegripper commented 3 years ago

So I'm pretty happy with the way the tests have worked out (except I have a file called testing_test.go and some of the naming).

Be great to get some thoughts on this before I write up the docs. The testing_test.go should show how this can be used.

lawrencegripper commented 3 years ago

Any thoughts on this one? If we're happy with the approach I can finish off the docs and get this ready for review.

lawrencegripper commented 3 years ago

Think this should be all set, I've added some basic docs to the README and removed the usage of gomega

mjarkk commented 3 years ago

One last thing. Can you update to the latest master, after that I'll merge it :)

lawrencegripper commented 3 years ago

No worries, I've rebased this onto the current master now.