Testing Tools for Programmers (twill, scotch, figleaf, wsgi_intercept, and pinocchio) C. Titus Brown C. Titus Brown Talk.

Slides:



Advertisements
Similar presentations
(Thinking About) Introducing Agile Testing to the One Laptop Per Child Project C. Titus Brown Asst. Prof., Michigan State U. C. Titus Brown.
Advertisements

Agile Software Distribution
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
Selenium Tutorial. What is Selenium? Javascript framework that runs in your web- browser Works anywhere Javascript is supported Hooks for many other languages.
(Web) Testing for Pythonistas C. Titus Brown Grig Gheorghiu C. Titus Brown Grig Gheorghiu.
By SAG Objectives Cross platform QA Automation for web applications Scheduling the automation Automatically build the test scripts Generate the.
Languages for Dynamic Web Documents
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Multiple Tiers in Action
Getting Started with Microsoft SQL Server 2012 Express Edition Appendix A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
UWWD In our quest to eliminate bad websites, we present…. HALLELUJAH!!
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
FHIRFarm – How to build a FHIR Server Farm (quickly)
Platform as a Service (PaaS)
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
QA Automation Solution. Solution Architecture Test Management tool CI Tool Automation framework Testing Project BDD Tool Text of test to Testing Project.
Getting Started with Oracle Database 11g Release 2 Express Edition Appendix B DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
RUBY ON RAILS It’s so rad. What we’ll cover  What is Ruby?  What is RoR?  Why RoR?  Developing with RoR  Deployment  Demo  Questions.
W3af LUCA ALEXANDRA ADELA – MISS 1. w3af  Web Application Attack and Audit Framework  Secures web applications by finding and exploiting web application.
Additional Topics. Tutorial #9 Review – Forms Forms Legend and fieldset Fields Text Password Radio buttons, check box, text area, select lists Buttons.
Erlware For Managing Distribution and Build Erlang User Conference 2007.
JavaScript & jQuery the missing manual Chapter 11
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
PHP. Why should we learn web programming? No need write socket programming. - You can forget TCP/IP & OSI layers. - Web server handles socket tasks for.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
A data retrieval workflow using NCBI E-Utils + Python Part II: Jinja2 / Flask John Pinney Tech talk Tue 19 th Nov.
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Putting What We Learned Into Context – WSGI and Web Frameworks A290/A590, Fall /16/2014.
Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
Web Engineering we define Web Engineering as follows: 1) Web Engineering is the application of systematic and proven approaches (concepts, methods, techniques,
Leveraging ArcGIS Online Elevation and Hydrology Services
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Introduction To Web Application Security in PHP. Security is Big And Often Difficult PHP doesn’t make it any easier.
Michael Still Google Inc. October, Managing Unix servers the slack way Tools and techniques for managing large numbers of Unix machines Michael.
Overview: 1. Discussion of the basic architecture of a web application. 2. Discussion of the relevance of using MySQL and PHP in a web application.
 HTML is hypertext markup language. It is a way for people to display their information with more complex pictures and text displays. Before HTML, messages.
Documentation NCRR Documentation for BioPSE/SCIRun and map3d All this great software and you want documentation too!?
HTTP - Forms - AppEngine Jim Eng
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
© 2004 OPNET Technologies, Inc. All rights reserved. OPNET and OPNET product names are trademarks of OPNET Technologies, Inc. ARMing Apache David Carter.
TownMUD An Interface for a Text-Based Multiple User Dimension.
Esri UC 2014 | Technical Workshop | Creating Geoprocessing Services Kevin Hibma.
Dean Anderson Polk County, Oregon GIS in Action 2014 Modifying Open Source Software (A Case Study)
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
Devanshu Bawa Customization Specialist Logo Business Solutions.
K. Harrison CERN, 22nd September 2004 GANGA: ADA USER INTERFACE - Ganga release status - Job-Options Editor - Python support for AJDL - Job Builder - Python.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Using Docker in a CyVerse World The main portion of this tutorial should take about 45 minutes to go through, and assumes you have already gone through.
Esri UC 2014 | Technical Workshop | Administering ArcGIS for Server with Python Jon Bodamer.
Platform as a Service (PaaS)
Platform as a Service (PaaS)
The next-gen. list archiver
Google Web Toolkit Tutorial
Line of Business Solutions in SharePoint Online
Development and Deployment with WSGI in Django
Alan Chalker and Eric Franz Ohio Supercomputer Center
GIFT / Fiscal Data Package Iteration 3
Google App Engine Ying Zou 01/24/2016.
SSDT and Database Project Basics
Leveraging ArcGIS Online Elevation and Hydrology Services
Python and REST Kevin Hibma.
Web Application Development Using PHP
Presentation transcript:

Testing Tools for Programmers (twill, scotch, figleaf, wsgi_intercept, and pinocchio) C. Titus Brown C. Titus Brown Talk slides & code at ‘

This is a concept & demo talk. I’m not selling anything. I’m not giving a tutorial. This stuff is useful and fun. I have published the slides and demo code if you want to look into anything.

Testing tools for programmers must be simple, easy to deploy & use, and configurable. Otherwise people won’t use them.

Functional Web testing with twill go showforms formvalue 1 q “google query statistics” submit show forms, cookies, redirects, http basic auth, link following, link checking, http code assertions, test for text presence/nonpresence, tidy checking, etc. no JavaScript support ;( go showforms formvalue 1 q “google query statistics” submit show forms, cookies, redirects, http basic auth, link following, link checking, http code assertions, test for text presence/nonpresence, tidy checking, etc. no JavaScript support ;(

twill is Python from twill.commands import * go(‘ showforms() formvalue(‘1’, ‘q’, “google query statistics”) submit() show() All base twill commands directly accessible from Python. Additionally, a “nice” wrapper around mechanize is available. from twill.commands import * go(‘ showforms() formvalue(‘1’, ‘q’, “google query statistics”) submit() show() All base twill commands directly accessible from Python. Additionally, a “nice” wrapper around mechanize is available.

wsgi_intercept lets twill talk directly to WSGI apps. app = get_wsgi_app() import twill twill.add_wsgi_intercept(‘localhost’, 80, lambda: app) twill.commands.go(‘ … twill.remove_wsgi_intercept(‘ This is fairly close in concept to paste.fixture, but you can use the same script for testing a direct WSGI connection as you can for testing your whole “Web stack” (server + middleware + app). (Will show you demo) app = get_wsgi_app() import twill twill.add_wsgi_intercept(‘localhost’, 80, lambda: app) twill.commands.go(‘ … twill.remove_wsgi_intercept(‘ This is fairly close in concept to paste.fixture, but you can use the same script for testing a direct WSGI connection as you can for testing your whole “Web stack” (server + middleware + app). (Will show you demo)

scotch lets you record & replay WSGI data, and generate twill scripts too. app = get_wsgi_app() import scotch.recorder recorder = scotch.recorder.Recorder(app) serve_wsgi(recorder) … app = get_wsgi_app() for record in recorder.record_holder: print record.replay(app) app = get_wsgi_app() import scotch.recorder recorder = scotch.recorder.Recorder(app) serve_wsgi(recorder) … app = get_wsgi_app() for record in recorder.record_holder: print record.replay(app)

figleaf is a code coverage recording tool. import figleaf figleaf.start() … figleaf.stop() figleaf.write_coverage(‘.figleaf’) Intended for programmatic use; can take coverage from multiple runs/deployments/platforms, and intersect/union results. Can retrieve from running Web server. import figleaf figleaf.start() … figleaf.stop() figleaf.write_coverage(‘.figleaf’) Intended for programmatic use; can take coverage from multiple runs/deployments/platforms, and intersect/union results. Can retrieve from running Web server.

Demos, part I CherryPy: 1. Unit tests with twill are easy. 2. Unit tests with twill talking directly to WSGI are easier. 3. Some simple code coverage analysis. 4. Some not-so-simple code coverage analysis. 5. A twill extension to do simple “fuzz” testing.

Demos, part II Django: 1. You can also test Django apps. 2. Recording a new Django test with scotch. 3. Converting the Django test into a twill script. 4. Playing back the Django test.

Next steps twill/scotch/figleaf/pinocchio/wsgi_intercept release (much of this stuff is in “-latest”, not released) Improve figleaf dramatically (only minimally usable ;) Document. Now y’all test, y’here? twill/scotch/figleaf/pinocchio/wsgi_intercept release (much of this stuff is in “-latest”, not released) Improve figleaf dramatically (only minimally usable ;) Document. Now y’all test, y’here?

Resources Google “python” + package. New! ‘testing-in-python’ mailing list.