Open abanuelo opened 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.27%. Comparing base (
d7679fb
) to head (185fe3c
).
In order to for dynamic webots tests to work you need a physical or virtual display. If you are:
ssh
ing into the instance and triggering the webots tests manually it is VERY important you create a virtual screen prior to running the tests!
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99
If not you will generate the following warning which will automatically fail all webots dynamic scenario tests:
Warning: Could not find the Qt platform plugin "offscreen" in ""
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
/usr/local/bin/webots: line 105: 12490 Aborted (core dumped) "$webots_home/bin/webots-bin" "$@"
If you are using the DCV client to run the test (as illustrated in the PR description above), the built in DISPLAY
port should be fine and no need to run the commands above.
Description
Adding a webots dynamic scenario test where an object is created above a plane and then drops until it hits the floor. The test checks the expected start and ending z values for the object's position. Note, that webots runs headlessly via a python subprocess. This subprocess then creates a
results.txt
file which contains the starting and ending z positions. Below is an illustration of the test case running on our machine:https://github.com/BerkeleyLearnVerify/Scenic/assets/32311654/dbade0af-69fc-48a9-b4c5-ea84c27d68ab
Issue Link
Checklist
pytest
and/or other meansAdditional Notes