# Testing
{id: testing}

## Traditional Organizations
{id: traditional-organization}

* Months of planning
* Many months of development
* Many months of testing / qa
* Release once every few months or once a year
* (Waterfall)




## Quality Assurance
{id: quality-assurance}

* Nightly build
* Testing new features
* Testing bug fixes
* Maybe testing critical features again and again...
* ...or maybe not.
* Regression testing?
* Testing / qa has a huge boring repetative part.
* It is also very slow and expensive.



## Web age Organizations
{id: web-organization}

* Very frequent releases (20-30 / day!)
* Very little time for manual testing
* CI - Continuous Integration
* CD - Continuous Delivery
* CD - Continuous Deployment



## TDD vs Testing as an Afterthought
{id: tdd-vs-aferthought}

* TDD - Test Driven Development.
* 
* Testing as an afterthought:
* Exiting product
* Mostly works
* Hard to test



## Why test?
{id: why-test}

* Business Value
* Avoid regression
* Better Software Design (TDD)
* Your Sanity



## Testing Modes
{id: testing-modes}

* Functional testing
* Unit testing
* Integration testing
* Acceptance testing (BDD Behavior-driven development?)
* White box
* Black box
* Regression testing
* Usability testing
* Performance testing
* Load testing
* Security testing
* ...



## Testing Applications
{id: testing-applications}

* Web site
* Web application
* Web API / Microservice (JSON, XML)
* Mobile Application
* Desktop Application (GUI)
* Command-line tool (CLI)
* Batch process



## Testing What to test?
{id: testing-what-tot-test}

* How would you check that they work as expected?
* What if they get invalid input?
* Edge cases? (e.g. 0, -1, 131314134141)
* A value that is too big or two small.
* Invalid or no response from third-party system.



## Testing in Python
{id: testing-in-python}

* Doctest
* Unittest
* Pytest
* Nose
* Nimoy
* Hypothesis
* Selenium
* Tox



## Testing Environment
{id: testing-environment}

* Git (or other VCS)
* Virtualenv
* Docker
* ...



## Testing Setup - Fixture
{id: testing-setup-fixtures}

* Web server
* Databases
* Other machines
* Devices
* External services



## Testing Resources
{id: testing-resources}

* [AB Testing](http://www.angryweasel.com/ABTesting/) Alan and Brent talk about Modern Testing






