Testing Python. Applying Unit Testing, TDD, BDD and Acceptance Testing



Similar documents
U.S. Call Center Software Markets

Next Generation Enterprise Mobility Management Market Insight

World Enterprise, Broadband, Mobile Video Transcoders Market

Analysis of the Global Enterprise Firewall Market

Global Big Data Analytics Market for Test and Measurement

World Wireless Protocol Analyzers and Network Monitoring Systems

Strategic Global Sourcing Best Practices

2015 U.S. Technical and Trade Schools Industry - Industry Report

Brochure More information from

Forms 1099 & W-9 Update - Current Year IRS Information Reporting Form Guidelines - Recorded Webinar

Global Opioid Dependence Drugs Market Highlights

Non-life Insurance IT Solutions Europe

Europe Rheumatoid Arthritis Market Highlights

Strategic Analysis of the Impact of Big Data on the European and North American Automotive Industry

Global Multiple Sclerosis Epidemiology and Patient Flow Analysis

Project Manager's Spotlight on Change Management

Global Multiple Myeloma Epidemiology and Patient Flow Analysis

Global Haemophilia Epidemiology and Patient Flow Analysis

Business Intelligence and the Cloud. Strategic Implementation Guide. Wiley and SAS Business Series

Public Cloud Computing Market for SMBs in India - Affordable Connectivity and Virtualization Technologies to Drive Adoption of Public Cloud

Analysis of the North American Automotive Wire and Cable Materials Market: Price-performance Index of Materials Will be Key in Driving Growth

U.S. Mobile Device Management (MDM) Market 2012: Solving the Many Challenges in Enterprise Mobility

Project Scheduling and Management for Construction. 4th Edition. RSMeans

Lead Generation and Nurturing: Benchmarking Report 2012

Strategic Analysis of Fleet Vehicle Leasing Market in Ireland

ZOHO Company Profile, focussing on CRM Activities

"Personal Accident and Health Insurance Claims and Expenses in Morocco to 2018: Market Databook"

The Practical Guide to Project Management Documentation

Life Insurance Distribution Channels in Croatia to 2019: Market Databook

Ulcerative colitis Pipeline Highlights

2013 U.S. Telephone Answering Service Industry-Industry & Market Report

U.S. Database Management System Software by Vertical Market

Call Center Strategies 2013

Cloud Infrastructure Testing and Cloud-based Application Performance Monitoring Market

'Personal Accident and Health Insurance Premiums and Claims in Australia to 2018: Market Brief' contains

IP VPN Market Forecast in India to 2016

Global Physical Security Information Management Market Assessment

Personal Accident and Health Insurance Investments in Russia to 2018: Market Databook

Western European Storage Area Network (SAN) Market

Effective Software Project Management

Personal Accident and Health Insurance Claims and Expenses in Belarus to 2016: Market Databook

Cloud Infrastructure as a Service Market Update 2015

'Personal Accident and Health Insurance Premiums and Claims in Kenya to 2018: Market Brief' contains

Excel 2013 Power Programming with VBA. Mr. Spreadsheet's Bookshelf

The Fundamentals of Organizational Behavior. What Managers Need to Know

Predictive Analytics for Human Resources. Wiley and SAS Business Series

Complete B2B Online Marketing

Personal Accident and Health Insurance Claims and Expenses in South Africa to 2017: Market Databook

The Laboratory Quality Assurance System. A Manual of Quality Procedures and Forms. 3rd Edition

Non-Life Insurance Premiums and Claims in Georgia to 2017: Market Brief

Non-Life Insurance Premiums and Claims in Brazil to 2018: Market Brief

A User's Manual to the PMBOK Guide. 2nd Edition

Estonia: Clay Tiles And Roofing - Market Report. Analysis And Forecast To 2020

Epidemiology Foundations. The Science of Public Health. Public Health/Epidemiology and Biostatistics

Enterprise VoIP - Future Potential of the Indian Market for Managed VoIP Solutions

Analysis of the Global Vulnerability Management Market

European Electronic Medical Records (EMR) Markets

Microsoft Dynamics CRM 2011 Administration Bible

Essentials of Working Capital Management. Essentials Series

Global Change and Configuration Management Software Market

General Dynamics Corporation - Mergers & Acquisitions (M&A), Partnerships & Alliances and Investment Report

Global Project Portfolio Management Market

Project Portfolio Management. A View from the Management Trenches

Individual Life Insurance in Indonesia to 2019: Market Databook

BP p.l.c. (BP) Company Profile- Business Overview, Strategies, SWOT and Financial Analysis

Global Big Data Analytics Market

Northeast Utilities: Corporate Analysis

Global and Chinese Polypropylene carbonate (PPC) Industry

2015 U.S. Life Insurance Carriers Industry-Industry & Market Report

Corporate Performance Management Best Practices. A Case Study Approach to Accelerating CPM Results. Wiley Corporate F&A

ACO Hardware in the United States

Risk and Financial Management in Construction

Analysis of the Brazilian Data Center Power Supplies Market

General Cable Corporation - Mergers & Acquisitions (M&A), Partnerships & Alliances and Investment Report

A Project Manager's Book of Forms. A Companion to the PMBOK Guide. 2nd Edition

Vulnerability Management (VM) - Global Market Analysis

North American Video Conferencing Hosted and Managed Services Market: Growing Amidst a Long-term Transition and Economic Turbulence

The Softletter Telesales Compensation and Efficiency Report

Forensic Accounting and Fraud Investigation for Non-Experts. 3rd Edition

North America Insurance Market Outlook to US Insurance Market Headstarting the Lost Momentum

Trends and Opportunities in the UAE Life Insurance Industry to 2016: Market Profile

Professional Java Tools for Extreme Programming. Ant, XDoclet, JUnit, Cactus, and Maven

SharePoint 2010 Business Intelligence 24-Hour Trainer

Global EFT POS Terminals Market

Professional Alfresco. Practical Solutions for Enterprise Content Management

How To Understand Cell Network Indoor Coverage In China

Enterprise Performance Management Done Right. An Operating System for Your Organization. Wiley CIO

Pediatric Trials: Patient Recruitment Best Practices

2005 Best Practices in Telephone Customer Service: A Call Center Benchmark Report (Full Report)

North American Premises Wiring System Markets

Saudi Cable Company Company Profile - Business Description, Strategies and SWOT Analysis

Analysis of the European MPLS/IP VPN Market

United Kingdom Defence and Security Report 2015

Impact of Cybersecurity Innovations in Key Sectors (Technical Insights)

Genesis Oil & Gas Consultants Ltd Company Profile - Business Description, Strategies and SWOT Analysis

Varma Mutual Pension Insurance Company - Mergers & Acquisitions (M&A), Partnerships & Alliances and Investment Report

Premiere Global Services, Inc. Company Profile - Business Description, Strategies, SWOT and Financial Analysis

Building and Renovating Schools. Design, Construction Management, Cost Control. RSMeans

Transcription:

Brochure More information from http://www.researchandmarkets.com/reports/2755225/ Testing Python. Applying Unit Testing, TDD, BDD and Acceptance Testing Description: Fundamental testing methodologies applied to the popular Python language Testing Python; Applying Unit Testing, TDD, BDD and Acceptance Testing is the most comprehensive book available on testing for one of the top software programming languages in the world. Python is a natural choice for new and experienced developers, and this hands-on resource is a much needed guide to enterprise-level testing development methodologies. The book will show you why Unit Testing and TDD can lead to cleaner, more flexible programs. Unit Testing and Test-Driven Development (TDD) are increasingly must-have skills for software developers, no matter what language they work in. In enterprise settings, it's critical for developers to ensure they always have working code, and that's what makes testing methodologies so attractive. This book will teach you the most widely used testing strategies and will introduce to you to still others, covering performance testing, continuous testing, and more. - Learn Unit Testing and TDD important development methodologies that lie at the heart of Agile development - Enhance your ability to work with Python to develop powerful, flexible applications with clean code - Draw on the expertise of author David Sale, a leading UK developer and tech commentator - Get ahead of the crowd by mastering the underappreciated world of Python testing Knowledge of software testing in Python could set you apart from Python developers using outmoded methodologies. Python is a natural fit for TDD and Testing Python is a must-read text for anyone who wants to develop expertise in Python programming. Contents: Introduction 1 CHAPTER 1 A History of Testing 5 You Do Test, Don t You? 7 Fundamentals and Best Practices 7 Python Installation 8 Linux 8 Mac 8 Windows 8 Pip 9 Virtualenv 9 Source Control (SVN, Git) 10 Interactive Development Environment (IDE) 11 Summary 12 CHAPTER 2 Writing Unit Tests 15 What Is Unit Testing? 15

What Should You Test? 17 Writing Your First Unit Test 17 Checking Values with the assertequals Method 18 Checking Exception Handling with assertraises 20 Following the PEP-8 Standard 22 Unit Test Structure 23 Additional Unit Test Examples 24 Getting Clever with assertraises 24 Making Your Life Easier with setup 25 Useful Methods in Unit Testing 27 assertequal(x, y, msg=none) 27 assertalmostequal(x, y, places=none, msg=none, delta=none) 27 assertraises(exception, method, arguments, msg=none) 28 assertdictcontainssubset(expected, actual, msg=none) 28 assertdictequal(d1, d2, msg=none) 28 asserttrue(expr, msg=none) 28 assertfalse(expr, msg=none) 29 assertgreater(a, b, msg=none) 29 assertgreaterequal(a, b, msg=none) 29 assertin(member, container, msg=none) 30 assertis(expr1, expr2) 30 assertisinstance(obj, class, msg=none) 30 assertnotisinstance(obj, class, msg=none) 30 assertisnone(obj, msg=none) 30 assertisnot(expr1, expr2, msg=none) 31 assertisnotnone(obj, msg=none) 31 assertless(a, b, msg=none) 31 assertlessequal(a, b, msg=none) 31 assertitemsequal(a, b, msg=none) 31 assertraises(excclass, callableobj, -args, --kwargs, msg=none) 32 Summary 32 CHAPTER 3 Utilizing Unit Test Tools 33

Using Python s Nose 33 Installing Nose 34 Using Nose s Best Features 35 Running Specifi c Test Files 35 Getting More Detail with Verbose 35 Debugging Support with PDB 36 Checking Your Coverage 38 Coloring your tests with Rednose 39 PyTest: An Alternative Test Runner 40 Installing PyTest 40 PyTest s Best Features 41 Running Specifi c Tests 41 Viewing Detail with Verbose and Summary 42 Debugging with PDB 43 Checking Your Coverage with PyTest 45 Choosing Between Nose and PyTest 46 Mock and Patch Tricky Situations 46 Installing the Mock Library 47 Mocking a Class and Method Response 47 When Mock Won t Do, Patch! 50 The Requests Library 50 Patch in Action 50 Advanced Mocking 52 Summary 53 CHAPTER 4 Writing Testable Documentation 55 Writing Your First Doctest 56 Th e Python Shell 56 Adding Doctests to a Method 57 Running Your Doctests 58 Handling Error Cases 59 Advanced Doctest Usage 61

Improving Doctests with Nose Integration 62 Summary 65 Resources 65 CHAPTER 5 Driving Your Development with Tests 67 Agile Development 67 Adopting the Agile Process Now 68 Ethos of Test Driven Development 70 Advantages of Test Driven Development 72 Ping-Pong Programming 72 Test Driving Your Problem 73 Writing Your Failing Test 74 Making Your Test Pass 75 Driving More Features with Tests 75 Wrapping Up the Task 77 Summary 82 Resources 83 CHAPTER 6 Writing Acceptance Tests 85 What Is Acceptance Testing? 85 Anatomy of an Acceptance Test 87 Using Gherkin Syntax 87 Th e Magic Is in the Step File 88 Goals of Acceptance Testing 89 Implementing Developer and QA Collaboration 90 Letting Behavior Drive Your Problem 90 Writing Your Failing Acceptance Test 90 Defining Your Steps 92 Implementing Your Code 94 Developing More of the Feature 95 bank_apppy 96 indexhtml 97 Delivering the Finished Article 98 Advanced Acceptance Test Techniques 102

Scenario Outline 102 Tables of Data in Scenarios 103 Summary 104 Resources 105 CHAPTER 7 Utilizing Acceptance Test Tools 107 Cucumber: The Acceptance Test Standard 107 Lettuce in Detail 108 Tagging 108 Fail Fast 112 Nosetest Integration 114 Robot: An Alternative Test Framework 115 Installing Robot 116 Writing a Test Case 116 Implementing Keywords 117 Running Robot Tests 119 Summary 123 Resources 123 CHAPTER 8 Maximizing Your Code s Performance 125 Understanding the Importance of Performance Testing 126 JMeter and Python 126 Installation 127 Configuring Your Test Plans 128 Utilizing Your Test Plans Effectively 135 Code Profiling with cprofile 135 Run a cprofile Session 136 Analyzing the cprofile Output 142 Summary 144 Resources 144 CHAPTER 9 Looking After Your Lint 145 Coming to Grips with Pylint 146 Installing Pylint 146

Using Pylint 146 Understanding the Pylint Report 149 The Module Block 149 The Messages by Category Section 149 The Messages Section 150 The Code Evaluation Score 150 The Raw Metrics Section 150 The Statistics by Type Section 150 Customizing Pylint s Output 150 Telling Pylint to Ignore Errors 153 Covering All Your Code with Unit Tests 154 Installing Coverage 155 Using Coverage 155 Advanced Coverage Options 157 Producing an HTML/XML Report 157 Setting a Minimum Coverage Threshold 159 Restricting Coverage to a Specific Package 159 Ignoring Coverage 160 Summary 161 Resources 162 CHAPTER 10 Automating Your Processes 163 Build Paver Tasks 164 Installing Paver 164 Creating a Paver Task 164 Executing Paver Tasks 165 Defi ning a Default Build 166 Setting Up Automated Builds 168 Installing Jenkins 169 Adding Coverage and PyLint Reports 175 Generating a PyLint Report 175 Generating a Coverage Report 176 Making Your Build Status Highly Visible 176

Summary 181 Resources 181 CHAPTER 11 Deploying Your Application 183 Deploying Your Application to Production 184 Creating a Deployable Artifact 185 Defining the Paver Tasks 185 Incorporating Packaging into the Build 187 Enabling Archiving on Jenkins 188 QA Environment 189 Implementing Stage and Production Environments 190 Implementing a Cloud Deployment 191 Creating a Heroku Account 192 Creating a Small Application 193 Setting up Git for Heroku 193 Deploying the Application to Heroku 194 Smoke Testing a Deployed Application 195 Example Application Stack 196 Smoke Test Scenarios 197 Implementing Smoke Tests 198 Summary 200 Resources 201 CHAPTER 12 The Future of Testing Python 203 Stub the Solution 203 Making Deployment Natural 205 Automating (Nearly) Everything 206 Working in Public 207 Collaborating on Step Definitions 208 Final Thoughts 209 Resources 210 Index 211

Ordering: Order Online - http://www.researchandmarkets.com/reports/2755225/ Order by Fax - using the form below Order by Post - print the order form below and send to Research and Markets, Guinness Centre, Taylors Lane, Dublin 8, Ireland.

Page 1 of 2 Fax Order Form To place an order via fax simply print this form, fill in the information below and fax the completed form to 646-607-1907 (from USA) or +353-1-481-1716 (from Rest of World). If you have any questions please visit http://www.researchandmarkets.com/contact/ Order Information Please verify that the product information is correct. Product Name: Web Address: Office Code: Testing Python. Applying Unit Testing, TDD, BDD and Acceptance Testing http://www.researchandmarkets.com/reports/2755225/ SC Product Format Please select the product format and quantity you require: Hard Copy (Paper back): Quantity USD 114 + USD 28 Shipping/Handling * Shipping/Handling is only charged once per order. Contact Information Please enter all the information below in BLOCK CAPITALS Title: Mr Mrs Dr Miss Ms Prof First Name: Last Name: Email Address: * Job Title: Organisation: Address: City: Postal / Zip Code: Country: Phone Number: Fax Number: * Please refrain from using free email accounts when ordering (e.g. Yahoo, Hotmail, AOL)

Page 2 of 2 Payment Information Please indicate the payment method you would like to use by selecting the appropriate box. Pay by credit card: You will receive an email with a link to a secure webpage to enter your credit card details. Pay by check: Please post the check, accompanied by this form, to: Research and Markets, Guinness Center, Taylors Lane, Dublin 8, Ireland. Pay by wire transfer: Please transfer funds to: Account number 833 130 83 Sort code 98-53-30 Swift code IBAN number Bank Address ULSBIE2D IE78ULSB98533083313083 Ulster Bank, 27-35 Main Street, Blackrock, Co. Dublin, Ireland. If you have a Marketing Code please enter it below: Marketing Code: Please note that by ordering from Research and Markets you are agreeing to our Terms and Conditions at http://www.researchandmarkets.com/info/terms.asp Please fax this form to: (646) 607-1907 or (646) 964-6609 - From USA +353-1-481-1716 or +353-1-653-1571 - From Rest of World