Skip to content
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

New tests for N2 GUI #1152

Merged
merged 85 commits into from Jan 25, 2020
Merged

New tests for N2 GUI #1152

merged 85 commits into from Jan 25, 2020

Conversation

tadkollar
Copy link
Member

This update performs headless browser testing on N2 HTML files generated from the models stored in n2_viewer/tests/gui_test_models. It consists of a Node script, test_gui.js, a set of model-specific tests in gui_scripts.json, and several test models. There's a set of toolbar tests that can be performed on any model. Changes were made to .travis.yml to install Node and add another test matrix row to test the GUI. Some changes were also made to the N2 source code to make sure each element had an id attrib.

Here's what the output on Travis looks like:
travis_output.txt

.travis.yml Outdated
testflo -n 1 openmdao --coverage --coverpkg openmdao --cover-omit \*tests/\* --cover-omit \*devtools/\* --cover-omit \*test_suite/\* --cover-omit \*docs/\* --cover-omit \*code_review/\*;
else
testflo -n 1 --timeout=120 openmdao;
- if [ -z "$SKIP_TESTFLO" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

could just use -z "$GUI" here and no need for SKIP_TESTFLO, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Having both allows for it to be tested in any other combo in the matrix by putting GUI=1 in that row - for instance in addition to/instead of testing standalone, we might want to test it with the Python 3.6 row because it usually completes faster.

.travis.yml Outdated
@@ -11,16 +11,21 @@ filter_secrets: false
os:
- linux

# language: node_js

# node_js: node
Copy link
Contributor

Choose a reason for hiding this comment

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

these commented lines can be deleted?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, didn't need that anymore after I changed it so it only installs Node.js when GUI=1

@tadkollar
Copy link
Member Author

Since it's not a Python package, I'm having a lot of trouble getting Node.js into setup.py so it would install with [test] or [all]. I'm thinking that because the GUI tests run outside of testflo, they should have their own script to kick them off, and that could check for the presence of node and automatically install if necessary.

@Kenneth-T-Moore
Copy link
Member

@tadkollar : I wonder if there is something @naylor-b can do to testflo to give it the capability to run the GUI tests.

@tadkollar
Copy link
Member Author

AppVeyor keeps failing on the Python 2.7 build with:

ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try git clean -xdf (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.

Not sure why that's happening, doesn't seem to be anything to do with my changes...

@swryan swryan merged commit 46e3d3b into OpenMDAO:master Jan 25, 2020
@tadkollar tadkollar deleted the n2test branch January 27, 2020 18:23
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.

None yet

4 participants