-
Notifications
You must be signed in to change notification settings - Fork 1
Sample application for testautomation tutorial using Angularjs
License
kappernator/ajaxdemo
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Ajax application ajaxdemo ========================= Ajax demo application implemented using AngularJS It is based on the AngularJS skeleton (https://github.com/angular/angular-seed). I had to exchange the PHP backend to a Python/mongodb one. Another important thing I had to add is testing. Acknowledgements ================ I started with the Wine Cellar application taken from here. http://coenraets.org/blog/2012/02/sample-application-with-angular-js/ Many thanks to cristatus from the Angularjs IRC channel. He helped me out debugging the wine cellar sample app. Debugging in Developer Tools ============================ Select an element and type the following into the console "angular.element($0).scope()". Restful Service =============== For demonstration I wrote a small RESTful service based on SimpleHTTPServer. This server is used to both serve the restful webservice and the application itself in order to comply with the same origin policy of the browsers. Interface for a restful webservice ---------------------------------- To create a resource on the server, use POST. To retrieve a resource, use GET. To change the state of a resource or to update it, use PUT. To remove or delete a resource, use DELETE. This means using the HTTP protocol as it is intended. Installing ajaxdemo and tools ----------------------------- All you need is a Python installation. Working on Jasmine-Unit-Tests ----------------------------- The ajaxdemo sample uses Testacular for Javascript unit testing. We assume that you have a Node.js installation on your machine and the testacular package installed as well. Testacular comes with a watcher which runs the Jasmine unittests every time you change a file. You can start the watcher with this command: ./script/test.sh Run ajaxdemo ------------ python ./scripts/restserver.py Visit the Wine Cellar demo app ------------------------------ Just point your browser to: http://localhost:8000/index.html
About
Sample application for testautomation tutorial using Angularjs
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published