usnistgov / SpectrumBrowser

ITL
12 stars 11 forks source link

Test Generator and Runner tool #136

Closed ranganathanm closed 9 years ago

ranganathanm commented 9 years ago

Automatically generate test cases and build a tool to run those test cases.

jkubNTIA commented 9 years ago

I am going to assign this to myself now that Raian and I will be using it.

jkubNTIA commented 9 years ago

I get the following error when I try to play back the saved testcases-file.json:

jkub@jkub-Precision-M6800:~/Documents/SpectrumBrowser/flask/unit-tests$ python testrunner.py -f ../tescases-file.json Please load the db using the appropriate data files before starting this test. Testing isAuthenticationRequired Traceback (most recent call last): File "testrunner.py", line 34, in runTest response = requests.post(script["requestUrl"],verify=False) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 88, in post return request('post', url, data=data, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request return session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send raise SSLError(e) SSLError: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Failed test suite. Running time = 0.00183010101318 s.

jkubNTIA commented 9 years ago

Ignore the above issue. We think we know what happened, but we still need to check. It may be that when we switched from https to http, and started the test capture again, we appended to the .json file instead of remove it and create a new one. So, we had https and http requests in the .json file.

jkubNTIA commented 9 years ago

I was able to get this test generator to work. However, I had to set authentication = false before I ran everything. I also was able to do 4 users at a time.