TTYtest allows running applications inside of a terminal emulator (like tmux) and making assertions on the output.
ttytest2 is an integration test framework for interactive console (tty) applications