google / google/openhtf

Silent error in web GUI when test script dies

Open
#631 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
722
Forks
237
Avg merge
11h 31m
Merged PRs (30d)
4

Description

To reproduce:

Start the gui server:
```shellsession
$ python -m openhtf.output.web_gui
Starting openhtf web gui server on http://localhost:12000.
```

Start the test and hit `^c` on the console after the GUI prompt occurs:
```shellsession
$ python openhtf/examples/hello_world.py
Enter a DUT ID in order to start the test.
192.168.10.184 - - [01/Aug/2017 16:10:09] "POST /RPC2 HTTP/1.1" 200 -
192.168.10.184 - - [01/Aug/2017 16:10:09] "POST /RPC2 HTTP/1.1" 200 -
192.168.10.184 - - [01/Aug/2017 16:10:09] "POST /RPC2 HTTP/1.1" 200 -
192.168.10.184 - - [01/Aug/2017 16:10:09] "POST /RPC2 HTTP/1.1" 200 -
^C2017-08-01 16:10:10,634 - ERROR - Received SIGINT, stopping all tests.
2017-08-01 16:10:10,634 - ERROR - Stopping due to SIGINT
2017-08-01 16:10:10,634 - ERROR - Test state:
Finishing test with outcome ABORTED.
Finishing test execution early due to test abortion, outcome ABORTED.
Finishing test with outcome ABORTED.
Finishing test execution early due to test abortion, outcome ABORTED.
Traceback (most recent call last):
File "/Users/dan/src/shaper/openhtf/examples/hello_world.py", line 89, in
test.execute(test_start=user_input.prompt_for_test_start())
File "/Users/dan/.virtualenvs/openhtf-master/lib/python2.7/site-packages/openhtf/__init__.py", line 265, in execute
final_state = self._executor.finalize()
File "/Users/dan/.virtualenvs/openhtf-master/lib/python2.7/site-packages/openhtf/core/test_executor.py", line 105, in finalize
self.test_state.abort()
File "/Users/dan/.virtualenvs/openhtf-master/lib/python2.7/site-packages/openhtf/core/test_state.py", line 284, in abort
self._finalize(test_record.Outcome.ABORTED)
File "/Users/dan/.virtualenvs/openhtf-master/lib/python2.7/site-packages/openhtf/core/test_state.py", line 293, in _finalize
'Blank or missing DUT ID, HTF requires a non-blank ID.')
openhtf.core.test_state.BlankDutIdError: Blank or missing DUT ID, HTF requires a non-blank ID.```
```

Now you can submit anything you want in the web form and nothing will appear there. You will see this error on the gui server console:

```shellsession
ERROR:tornado.access:500 POST /plugs/192.168.10.184/8888/34073:1501628725397:ab89e566f1ec49a0:a388aa195896402c/openhtf.plugs.user_input.UserInput (::1) 1.68ms
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.