javascript - How to manually test front-end and switch between server responses, -


i searching tool create ui choosing between server mockups tests response.

(or other solution while creating front-end)

i explain: developing front-end webapp. want manual test app (using mouse , keyboard without test runner) , without backend server. want see app in many sceniaros., when user sign-in, sign-out....

so want able easily switch between server mock response.

mockup of think needs be

i didn't found answer, have developed it!

you can see here:

http://aminag.github.io/javascript-xhr-mock-chooser/tests.host.html

settings file:

http://aminag.github.io/javascript-xhr-mock-chooser/xhr-mock-settings.json

github

https://github.com/aminag/javascript-xhr-mock-chooser/

example of settings file:

{ "default_show":"true", "data": [ {     "method":"get",     "url":"/",     "response":"great" }, {     "name":"test 2",     "method":"post",     "url":"/a",     "response":[         {             "response":"ok"         },         {             "name":"signed off",             "response":"false"         }     ] }, {     "name":"test 4 /c",     "url":"/c",     "response":{         "status":404     } }, {     "name":"test /b ",     "url":"/b",     "response":{         "content-type":"abc",         "body":"ok"     } }, {     "name":"test response multi object /d",     "url":"/d",     "response":[         {             "name":"sigen in",             "response":{                     "content-type":"abc",                     "body":"ok"             }         },         {             "name":"signed off",             "response":"false"         }     ] }, {     "url":"/api/getjson",     "response":"{\"json_working\":\"yes\"}" } ] } 

enter image description here


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -