lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] BOOST_TEST needed for automated GUI testing?


From: Greg Chicares
Subject: [lmi] BOOST_TEST needed for automated GUI testing?
Date: Sun, 16 Mar 2014 16:53:23 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Is it really important to use lmi's BOOST_TEST macro in
'main_wx_test.cpp', or would any other condition-testing
macro do as well?

I'm hoping that the answer is 'no', so that I can remove
the unit-test driver in 'cpp_main.cpp' (included via
'test_tools.hpp') from the GUI tests--so that the GUI tests
can be run with command-line arguments appropriate for lmi
itself (which differ from built-in unit-test arguments).
That would allow me to do this, for example:
  cd /opt/lmi/bin
  ./wx_test.exe --data_path=/opt/lmi/data
which lets the GUI tests use files in a specified data path.

Right now, the GUI tests work okay as long as I copy all data
files into the same directory as the 'wx_test' binary, but if
I run the commands above, this appears on the console:
  C:\opt\lmi\lmi-20140316T1359Z\wx_test.exe: unrecognized option 
'--data_path=/opt/lmi/data'
  Unrecognized option '--data_path=/opt/lmi/data'.
and this messagebox pops up:
  wxWidgets Debug Alert
  /opt/lmi/local/include/wx-3.0/wx/testing.h(268): \
    assert "Assert failure" failed in ReportFailure(): \
    Expected wxDialog dialog was not shown.
  Do you want to stop the program?
  You can also choose [Cancel] to suppress further warnings.
  Yes   No   Cancel

As far as I can guess, the "unrecognized option" warning
interferes with the GUI test, causing it to fail before
expect_about_dialog::OnInvoked() is even called.

Using the unit-test framework has some unimportant benefits:
e.g., warnings can be captured from stdout, and the number of
successful and unsuccessful tests is printed. But I'd happily
forgo those arguable benefits to be able to use lmi's command-
line arguments with the GUI-testing program.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]