Mailinglist Archive: yast-devel (35 mails)

< Previous Next >
[yast-devel] Testing interactive (libyui-)ncurses programs with expect
Hi,

Lukas told me this would be useful for SLEnkins. I havent caught up
with it yet but anyway, here's what I have now:

https://github.com/libyui/libyui-test is a little repo of a few
automated CI tests for libyui. See the Jenkins jobs (libyui-test-*) at
https://ci.opensuse.org/view/libyui/

The basic idea is to set up an environment where the actual UI can
be drawn: Xvfb for GUI, screen for TUI, and run that in CI.

Most of the tests are noninteractive but I made one interactive
ncurses test, using expect:
https://github.com/libyui/libyui-test/blob/master/input_field_test.exp
It just sends keys to the ncurses program. The result of the test is
determined by comparing the contents of a file. I am sure expect
could also compare the contents of the screen but this was easier to
do in this simple prototype.

--
Martin Vidner, YaST Team
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
< Previous Next >
This Thread
  • No further messages