Image CAPTCHA
Enter the characters shown in the image.

You are here

Automatic Testing for PHP

Automation is the best way to insure your code is fulfilling it purpose. make sure all features are functional with automatic testing platform. now you can change your code and verify all other features are intact.

There are several different types of testing tools or testing frameworks, available for PHP, which use different approaches. All of which are trying to avoid manual testing and the need for large Quality Assurance teams, just to make sure recent changes didn’t break existing functionality.

The more code you have the more testing you need and in more levels, starting with unit testing.

Here are few of the testing levels you need to consider: 

  1. Unit testing - is a programming approach to ensure functions, classes and methods are working as expected, from the point you build them all the way through the development cycle. By checking values going in and out of various functions and methods, you can make sure the internal logic is working correctly. By using Dependency Injection and building “mock” classes and stubs you can verify that dependencies are correctly used for even better test coverage.
    When you create a class or function you should create a unit test for each behavior it must have. the main idea is to verify the output on case of valid arguments but bad, or just verify its operation and outputs. later on when making changes on the function those tests will be your best verification that updates didn't changed its previous operation. also it can be suitable when updating other functions. also you can use var_dump() in a test.php, which is not a real good way to build an application operational verification.
    PHPUnit is well known within PHP developers, but there are other options, like: atoumKahlanPeridotSimpleTest
  2. Integration Testing - Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. you can use the same tools used suggested above.
     
  3. Functional Testing - can be used just before deployment or after (acceptance testing), functional testing consists of using tools to create automated tests that actually use your application instead of just verifying that individual units of code are behaving correctly and that individual units can speak to each other correctly. These tools typically work using real data and simulating actual users of the application.
    For functional testing you can use: SeleniumMinkCodeception full-stack testing framework that includes acceptance testing tools, Storyplayer another full-stack testing framework that includes support for creating and destroying test environments on demand.

You can build your testing framework as close as possible to the development platform given the option for the developers to use it as well, even within TDD strategy. TDD = Test Driven Development means building the actual test before development start, and directing the developing teams to work on each functionality until the test passes. 

Other testing strategy that more suitable for the QA and IT teams is BDD, which is a more standard way to write the tests. There are two different types of Behavior-Driven Development (BDD): SpecBDD and StoryBDD.

SpecBDD focuses on technical behavior of code, while StoryBDD focuses on business or feature behaviors or interactions. 

StoryBDD, is letting you the option to write human-readable stories that describe the behavior of your application. These stories can then be run as actual tests against your application. The framework used in PHP applications for StoryBDD is Behat, which is inspired by Ruby’s Cucumber project and implements the Gherkin DSL for describing feature behavior.

SpecBDD, gives you the option to write specifications that describe how your actual code should behave. Instead of testing a function or method, you are describing how that function or method should behave. PHP offers the PHPSpec framework for this purpose. This framework is inspired by the RSpec project for Ruby.

 

Also the is few other options that is important to be aware of:

  1. Selenium RC integration for PHPUnit: phpunit-selenium
  2. A simple yet flexible PHP mock object framework: mockery
  3. Highly opinionated mocking framework for PHP 5.3: Prophecy

 

yes

About The Author: 

QATestingTools.com, more technical information on Software Testing Tools and Testing Resources

Media: 
Test Driven Development

.

PHP

List mode
Table mode
Icons mode

Displaying 1 - 11 of 11

Title Testing Objectives Since Price Quotes Ping
Testlink Test Cases Statistics 2,003 Free use Active
SeleniumHQ Desktop testing, Object Based Testing, Web testing, Cross-Browser testing 2,006 Free use Active
RTH Application Life Cycle Tracking 2,006 Free use 2009
BlazeMeter Desktop testing, Stress Testing, Performance Analysis, Web testing, Cross-Browser testing 2,011 October 2014 :Basic - $249/month/1000 users, October 2014 :Pro - $649/month/5000 users, October 2014 :Pro Plus - $1349/month/10,000users Active
Codeception API testing, SOA testing, Web testing 2,012 Free Use Active
PHPUnit Code Analysis, Code Coverage testing, Coding Standards verfication, Static Code Analysis, DataBase testing 2,006 Free use Active
Agile Test 2,010 Free use 2011
Saucelabs Mobile Testing, Web testing, Cross-Browser testing 2,008 Active
Behat 2,011 Free Use Active
Testenium Framework Web testing 2,015 Active
Minq Web testing, Cross-Browser testing 2,012 Free use Active

MANUFACTURERS Wallboard

Testing tool manufacturers world-wide list
10Levels ABID CONSULTING AccelQ Accord Software ActiMind AdaCore
AdaLog AgileLoad AgileWay Agitar Algorismi ALL4TEC
Android Apache Apica Apollo Systems AppAssist.mobi Applitools
AppPerfect Appsee ApTest Assertible Assure Atlassian
AutoIt Consulti .. Automation Anyw .. Automation Cons .. Aztaz Software Backtrace I/O Badboy
BlazeMeter Borvid BrowserStack BSQUARE BStriker Intern .. CA Technologies
Canonical Canoo Catch Limited CelestialTeapot Celtic Testing .. Chris Mallett
Cleanscape ClicTest CloudQA CodeCentrix CodePlex projec .. Codoid
Cogitek Compuware Configure IT Conflair ConSol Core Services
Countersoft CresTech Softwa .. Cross Browser T .. Crosscheck Netw .. Crowdsourced Te .. Cucumber Ltd
Cyara Cygnet Infotech DareBoost Databene Datamatics Glob .. DevExpress
DTM soft Dynatrace LLC EasyQA Eclipse EKA TechServ Elvior
Emmanuel Jorge Empirix EPAM Systems Equafy Esterel Technol .. eXept Software ..
Experitest Finaris Froglogic FrontEndART Ltd GeneXus GitHub project
gnoso Google Code Pro .. GrammaTech Gurock Software Hewlett Packard .. Hexawise
High-Tech Bridg .. Hiptest Hitex IBM Rational imbus Shanghai Impetus
Inflectra informUp INTALIO InTENSO - IT Ex .. Ipswitch Jamo Solutions
JANOVA JAR Technologie .. JBoss Developer jClarity Jellly.io JetBrains
Jively jQuery foundati .. JS Foundation Jspresso Kanoah Software KMS Technology
Kualitee LDRA Limited Litmus LoadFocus Loadster Perfor .. MarathonITE
Marketcircle Marketcircle Maveryx Meliora Ltd Micro Focus Sof .. Microsoft
Mobile Labs Mobile1st Mockaroo, LLC ModalLogic IT Monkop Mozila
MSys Technologi .. Navicat NeoTys NetCart NORIZZK.COM Novosync Mobili ..
NRG Global NTT Resonant OC Systems Odin Technology OpCord Oracle
Orcanos Original Softwa .. Ossia Conseil OW2 PANAYA Parasoft
PassMark Patterson Consu .. Perfecto Mobile Pivotal, Inc. Plutora Postman (API To ..
PractiTest PrimaTest Process One Programming Res .. Psoda PureLoad
PushToTest Python Q-Assurance QA Systems QACube QASymphony
QAWorks QMetry Quali Qualitia Softwa .. Quality First S .. Quotium
RadView Softwar .. Ranorex RedLine13 Reflective Solu .. ReQtest RevDeBug
Robotium Tech Rogue Wave Soft .. Rommana Softwar .. RTTS ruby-doc.org Runscope
Sandklef GNU La .. Sauce Labs Seapine Softwar .. SeleniumHQ Sencha Sensiple
Siemens PLM Sof .. SmartBear Softw .. SmarteSoft SOASTA SoftLogica Softomotive
Softsmith Solution-Soft SonarSource Sourceforge SqashTeam SQS Software Qu ..
Square Stimulus Techno .. Swifting AB Synopsys T-komp T-Plan
TechExcel TechTalk Telerik By Prog .. Tellurium Test Collab Test Goat
Test Recon TestCaseLab testCloud.de Gm .. Testenium Testim.io Testing Technol ..
TestingBot TestLodge Testmunk TestObject GmbH Testomato TestOptimal
TestPlant TestPro Testuff The Core Bankin .. The MathWorks The Open Group
thePHP.cc Thoughtbot Thoughtworks Tigris.org Time Simulator Top-Q
Trace Technolog .. TrendIC TRICENTIS Tritusa Pty Ltd TWD Solutions P .. TypeMock
Tyto Software Ubertesters UniTESK Universal Test .. Usetrace Ltd Utrecht Univers ..
Validata Group Vanamco AG Vector Software Veracode Verifaya Corpor .. Verit
VersionOne Viewlike.us Vornex Inc. Watir.com WcfStorm Soluti .. We Are Mammoth
Web Performance .. Wintask Wireshark Found .. Worksoft Xceptance XebiaLabs
XK72 Xpand IT XQual ZAPTEST Zeenyx Software .. Zephyr
Zeta Software zutubi pty

Theme by Danetsoft and Danang Probo Sayekti