mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #572] QUESTION/REQUEST: Automation for the program using tview #419
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ArmenuhiKocharyan on GitHub (Mar 4, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/572
Hi,
We have a program which creates a terminal based UI for our GO script.
We need to automate test cases for the UI.
Is there any library/ test tool/ test framework for tview?
Thanks in advance.
@rivo commented on GitHub (Mar 11, 2021):
I have had something in mind for the longest time (since I started this project, actually) but haven't had the time to implement it. Basically, the idea is to create a mock
tcell.Screenimplementation that can be used instead of the regularScreenobjects which write to the console.This mock object would basically run "headless". It would be able to output a unique hash based on its current content, which could then be compared to a hash stored in the test cases. If a hash differs, it would mean there is an unwanted side effect somewhere (or the change was intentional and the test case hash needs to be updated). It should also be easily possible to log the screen's current state to the console (maybe when the
go test -vflag is set?) so one can visually inspect the test case results or debug it.I'm trying to figure out ways to dedicate more time to
tviewand I believe this test suite would be one of the first things I'd tackle given more time.