Giter Club home page Giter Club logo

stub's Introduction

What is the stub server?

stub <- request - curl
stub - xml     -> curl

stub <- request - sa
stub - xml     -> sa

bb test app <- request - sa
bb test app - xml     -> sa

bb.com <- request - sa
bb.com - xml     -> sa

How to install the stub and curl on Windows?

Download Python 2.65 from http://www.python.org/download/
Install to C:\Python26
Add C:\Python26 to system path

Go to http://github.com/beeman88/stub copy everything but the curl folder the files to C:\Python26
Make sure to put bottle.py in C:\Python26\Lib

If you don't have curl, copy the curl folder to C:\
If you have curl, copy curl_stub.bat to your curl folder
 
How to run in Windows?
Open command window
cd c:\Python26
python stub.py
you will be prompted for a port number (8080) that corresponds to a test folder

How does stub.py work?
matches an url and response with the contents of an xml file
sometimes a response status code is set 200, 401, 302
sometimes a response header location is set to an url

Open Dos window
cd C:\curl
curl_stub 8080 abc42b0d-d110-4f5c-ac79-d3aa11bd20cb user password tradingAccounts

What does curl_stub do?
curl_stub sends a series of requests that simulate a link and sync of resources

What does curl_stub output?
A log file in C:\Python26\8080\log.txt
Lists requests, debugging and the xml response

How are the test cases organized?
Each test case has a folder in C:\Python26
the folder is also used for the port number
eg folder 8080 has xml files and curl_stub will call http://localhost:8080/...
eg folder 8081 has xml files and curl_stub will call http://localhost:8081/...
readme.txt contains the curl_stub command used for the test case

How to set up tests?
Copy a port folder
in the port folder are xml repsonses, config, readme
config has the sync uuid
readme has test case description including uuid and curl_stub command
xml files has the responses
the xml files are changed to create the tests - look out for uuids, tick



stub's People

Stargazers

Bryan Belyk avatar

Watchers

Bryan Belyk avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.