News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Andrew Podner:
Functional Testing to Improve Quality Assurance (part 2)
June 03, 2013 @ 11:57:40

Andrew Podner has a posted the second part of his series looking at functional testing in PHP applications with Selenum.

In the first post about functional testing, we went through the basics of what functional testing is and how it complements and differs from other types of testing used for software quality assurance. This time, I will spend some time talking about using functional testing in a practical sense to set up a testing suite for a web based software project. [...] Each of these can provide a powerful means of performing automated functional testing and you should select your tool of choice based on what works best for you. I typically find myself using Selenium for functional testing, but again, I would encourage you to look at each available option out there and select the best fit

He walks you through the installation of the Selenium Firefox plugin, some of the basics of its use and how to create and run a simple test. He also looks at a slightly more complex example - filling in a form and validating the resulting page.

0 comments voice your opinion now!
functional testing quality assurance part2 series selenium

Link: http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-2

Andrew Podner:
Functional Testing to Improve Quality Assurance (part 1)
May 20, 2013 @ 09:19:17

Andrew Podner has posted the first part of a new series to his site today. He'll be looking at using functional testing to improve quality of the resulting code and full application.

For this week, I wanted to focus on some different types of automated testing other than unit testing that can help developers build more robust applications and improve both the speed and effectiveness of quality assurance. Specifically, this post is going to focus on functional testing. Functional testing is composed of the tests that you write which are from the user's point of view. A functional test is used to perform quality assurance on all or part of an application utilizing the user interface as a pathway to the application.

He gives some examples of functional tests like clicking on buttons, trying a login, checking that the contents of the page are correct. He talks some about the purpose of functional testing and how it differs from unit testing. He suggests the metaphor of a race car - the pit crew would be the "unit testers" and the driver would be the "functional tester", saying whether or not all of the parts of the car are working together as they should for the race. In the next part of the series, he'll talk some about the actual software to automate this process.

0 comments voice your opinion now!
functional testing quality assurance part1 series overview

Link: http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-1

Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPUnit part 4
September 05, 2011 @ 08:34:44

Michelangelo van Dam has posted the fourth part of his "Quality Assurance in PHP projects" series to his blog today - a continuation of his emphasis on PHPUnit and testing his sample "Tic-Tac-Toe" game.

In parts one, two and three we focussed on writing tests for a game of tic-tac-toe, with in parts two and three we optimized our tests so they focus on the functionality of the individual parts Grid and Player, with a collection class Players to handle Player objects.

In this fourth part he focuses on the rules for playing the game and the unit tests to validate the correct flow. He covers one of his tests before, looking at the "can be played" validation for identical symbols. He modifies this to use a provider that gives the test the set of data to work from with varying symbols. He writes additional tests to be sure the game "stops after winning" and that it has a winner/which player is the winner. You can find the full game source (complete with these tests) on his github account.

0 comments voice your opinion now!
phpunit quality assurance project unittest


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPUnit part 3
August 29, 2011 @ 09:18:28

Michelangelo van Dam is back today with the next part of his "Quality Assurance in PHP Projects" series, the third part of his look at PHPUnit, the popular PHP-based unit testing software.

Time for the third part on unit testing with phpunit in my Quality Assurance on PHP projects series. In part one we started writing unit tests for a simple game of tic-tac-toe. In part two we started converting our unit tests into actual code and moved our general unit test code for grids into a Grid focussed unit test. In this part, we're looking at how we can optimize the tests for our players.

He digs deeper into the TicTacToe application and focuses first on the single-player functionality, checking the symbol for the current player (an "X" or "O") and throwing exceptions in the code when things aren't right. He also shows the tests for checking on "more than one player" and "cannot add more than two players" scenarios. Full code for the Player class and tests are included.

1 comment voice your opinion now!
quality assurance project phpunit unittest tutorial tictactoe tdd


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPUnit part 2
August 23, 2011 @ 08:38:19

Michelangelo van Dam has posted the second part of his look at PHPUnit in his "Quality Assurance in PHP Projects" blog post series. This is a continuation from part one.

I hope everyone enjoyed my first article on unit testing with phpunit where I started writing a few tests that would guide us building our little game of tictactoe. Today I'm going start with turning these tests into working code and adjusting our tests to have a clear separation of responsibility. Since we already know what the code should produce, we only have to work out the details.

He picks up where he left off on his "tic-tac-toe" example by defining some of the classes that will be needed to fulfill the tests and a sample test to check the generated grid's contents. He includes the Grid class that will do the job (full code included) and a full test case class that runs his example with checks on testGameGridIsSetAtStart, testGridCanPositionASymbol, testGridHasThreeSymbolsInARow and testGridHasThreeSymbolsInAColumn, some with their own data providers.

0 comments voice your opinion now!
quality assurance project phpunit unittest tutorial tictactoe tdd


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPUnit part 1
August 17, 2011 @ 10:02:33

Michelangelo van Dam continues his "Quality Assurance in PHP projects" series in his latest post, the first of a few, about using PHPUnit to test your application.

Of all tools available for improving quality assurance, there's one tool that is the core tool you have to master: PHPUnit. PHPUnit is a complete testing framework crafted by Sebastian Bergmann (@s_bergmann), who ported existing xUnit frameworks to PHP. And with this testing framework you're able to test your functionality in an automated way before you push code into production.

Michelangelo walks you through the installation (via the PEAR installer), creating a phpunit.xml configuration file and making a basic bootstrapper to define some paths and environments. To make the tests a bit more relevant than just pseudo-test examples, he's created a set of tests based around a tic-tac-toe application in a test-driven design fashion (tests first, then code). In this first part he sets up some of his assertions in the tests, but you'll have to wait until part 2 for the code that will make them pass.

0 comments voice your opinion now!
quality assurance project phpunit unittest tutorial tdd


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPDocumentor feedback
August 08, 2011 @ 11:42:47

As a follow up to his previous post about using DocBlock commenting and phpDocumentor for automatic project documentation generation, Michelangelo van Dam has posted a deeper look at DocBlox, one of his previously mentioned alternatives.

First of all, thank you all for the enormous feedback I got on my latest article on documentation of code. I got a lot of comments on the usage of PHPDocumentor. [...] I have to agree that [there are reasons] valid enough to step away from PHPDocumentor as a tool for documentation purposes and look for a better alternative. So I've investigated one tool most people have commented on or tweet-ed/facebook-ed/g+-ed on: DocBlox.

He touches on the installation of the tool and mentions this tutorial from Matthew Weier O'Phinney that guided him through the setup and use of DocBlox. He rand a few tests comparing phpDocumentor and DocBlox for the documentation generate and DocBlox came out on top when it came to runtime (and memory usage).

0 comments voice your opinion now!
quality assurance project phpdocumentor docblox feedback


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPDocumentor
July 27, 2011 @ 08:51:48

Michelangelo van Dam has posted the latest in his "quality assurance in PHP projects" series today with a look at something that can make your life and documentation easier - PHPDocumentor.

Unfortunately I've come across too many lines of code that were just lines of code, no comments or annotations provided. So, in best cases I could guess the types and parameters, but in many it was too obfuscated. I already talked about usage of a code sniffer like PHP_CodeSniffer in my previous post where you can validate the usage of comments in the code. But forcing developers (using a pre-commit checker) into writing documentation with their code is not really a good thing.

He suggests using something like PHPDocumetor (there's other PHPDoc parsers including DocBlox and Doxygen out there) to automatically generate documentation for your code based on its comments, giving your developers easier web-based access to the contents. He includes some sample docblocks for a class/method and gives an example command line call to build docs based on a project. A screencast and screenshot of the generated site shows the results of the run.

0 comments voice your opinion now!
phpdocumentor docblock parse quality assurance documentation


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHP_CodeSniffer
July 18, 2011 @ 09:06:48

Michelangelo van Dam has posted the next part in his "QA in PHP development" series to his blog, a look at PHP_CodeSniffer, a tool that can be used to keep the coding standards of your application in line.

PHP_CodeSniffer is probably the most convenient tool out there to analyze your source code and to verify it complies to company policies. Although it's debatable why source code should follow strict guidelines, it's only a matter of time before you discover yourself that it pays off to have a code base that appears to be written by one developer.

He talks about how it works to keep every brace in the right place and format the same through out all of your files. He also mentions that its standards are flexible and can be modified as you might see fit. He looks at the installation process (both manual and through the PEAR installer) and how to use it to analyze your codebase. He's even included a short screencast in the post so you can see the results first-hand.

0 comments voice your opinion now!
quality assurance project code phpcodesniffer standards tutorial


Michelangelo van Dam's Blog:
Quality Assurance on PHP projects (and PHPLint)
July 15, 2011 @ 08:26:32

Michelangelo van Dam has started a new series of posts on his blog about quality assurance in PHP projects with this introduction and a look at the first tool on his list PHPLint.

Quality Assurance has become an increasing important part of web application development, especially with PHP applications. [...] Luckily there are a lot of tools available that allows you to increase quality of these web applications, and the best part is they are all based on PHP! Let's have a quick look at what tools are interesting to start improving quality assurance on your PHP projects.

The first tool, PHPLint, helps you validate code against syntax errors and is built into the command-line PHP you already have. He describes its use, both on the command-line and in a pre-commit hook on his git repository

For more PHP QA-related information, he also points out the book from Sebastian Bergmann and Stefan Priebsch as a good reference too.

0 comments voice your opinion now!
lint check quality assurance project tool



Community Events





Don't see your event here?
Let us know!


symfony framework voicesoftheelephpant introduction bugfix api community series deployment laravel podcast developer library release zendserver language tips list interview conference

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework