Skip to content

Build Testing approach using tcell simulation screen #88

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

Merged
merged 11 commits into from
May 4, 2021

Conversation

lawrencegripper
Copy link

@lawrencegripper lawrencegripper commented Mar 28, 2021

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

  • Update docs to show how to use this to test gocui
  • [ ] Add some sample tests to the _examples not got time to complete this item atm.

@lawrencegripper lawrencegripper marked this pull request as draft March 28, 2021 11:28
@mjarkk
Copy link
Member

mjarkk commented Mar 28, 2021

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
Copy link
Author

lawrencegripper commented Mar 29, 2021

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
Copy link
Author

lawrencegripper commented Mar 29, 2021

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
Copy link
Author

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

Copy link
Member

@mjarkk mjarkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya this is looking good!

I've personally not written a lot of test so i'm probably not the one to tell whats right or wrong but from what i can see in the code it looks good and it seems we can expend on this code.

I would like to have this merged as the possibility to easily write tests is always better than no possibility (or is very hard) to test.

@lawrencegripper lawrencegripper marked this pull request as ready for review April 22, 2021 10:02
@lawrencegripper
Copy link
Author

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

Copy link
Member

@mjarkk mjarkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, only some documentation i think could be changed

@mjarkk
Copy link
Member

mjarkk commented May 4, 2021

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

@lawrencegripper
Copy link
Author

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

@mjarkk mjarkk merged commit 33004d6 into awesome-gocui:master May 4, 2021
@lawrencegripper lawrencegripper deleted the lg/simtesting branch May 4, 2021 15:53
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