 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Codeception.com: Getting on Testing Ship
by Chris Cornutt June 13, 2013 @ 11:06:54
On the Codeception blog there's a new post that advocates getting on the testing ship even if the project you're currently on isn't using tests (or TDD).
In this blogpost we will try to figure out how to get faster into the testing. What tests to write at first? Let's say we already have a project and we didn't practice TDD/BDD developing it. Should we ignore testing at all? Definitely no. So where should we start then?
They suggest a three-tiered pyramid approach - UI at the top, Integration testing in the middle and Unit testing as the foundation. They talk about the times when testing doesn't make sense, like when your application is based on a third-party tool (like WordPress or Drupal). They recommend starting with functional testing and working your way back down, especially if your framework supports it. Obviously they encourage the use of Codeception for it, but also recommend even something like Selenium tests if nothing else.
voice your opinion now!
testing unit functional integration codeception skip
Anna Filina: Define Functional, Unit and Integration Tests
by Chris Cornutt April 08, 2013 @ 14:45:46
Anna Filina has a new post to her site that helps to clarify the definitions between functional, unit and integrations tests of your application's functionality.
I have recently read a blog post claiming that functional tests are not "true" tests. The author also claims that unit testing shows you where the problem is occurring, while functional testing simply identifies that a problem exists. This argument is deceptive and the conclusion dangerous. Different kinds of tests are not mutually exclusive. One is not superior to the other. They have different goals and can happily coexist. Let me explain the kinds of tests so that you could make enlightened decisions.
She covers each type of test in detail, noting the goal of that particular type and some examples of the kinds of things they might test. She starts with the highest level, functional testing, then jumps down to the lowest - unit testing. She finishes up the post defining "integration tests" as tests that ensure you're integrating correctly - that you're using the API provided by the tool in the right way and that it's working as expected.
voice your opinion now!
testing functional unit integration definition example
Chris Hartjes: PHPSpec and the New Wave of Testing
by Chris Cornutt October 19, 2012 @ 08:42:18
Chris Hartjes, a big proponent of testing in web applications (mostly in the PHP realm so far) has a new post to his site with some of his thoughts about PHPSpec, the specification-driven testing tool recently released by the same folks who made Behat.
I think that we are witnessing the first wave of new testing tools in the PHP community that allow developers to wrap their applications in automated tests. I am familiar with the BDD-style that is being promoted in PHPSpec, through my work with Behat to create automated user acceptance tests. I think if you want a tl;dr version of PHPSpec I would tell you "write hybrid unit/integration tests using plain language".
He notes that writing code to match a specification has similar concepts to using unit testing for TDD (with something like PHPUnit). He points out a few interesting things like the use of mock objects and the fact that you'll still need to write some code to make tests work - that's unavoidable right now.
voice your opinion now!
phpspec testing functional unit specification tdd
Codeception Blog: Test WebServices With Codeception
by Chris Cornutt June 20, 2012 @ 11:21:21
On the Codeception blog (an up and coming PHP-based testing tool) there's a new post showing how to use the tool to test your web services for either a SOAP or REST-based service.
Codeception testing framework got significant improvements during last week. The first and the major one is that you don't even need PEAR and Composer to execute tests. Only one file codecept.phar required. This might save your time and mind of your testers.
They've recently added modules for SOAP and REST support, making it easier to define your tests in a more fluid fashion. Included in the post are two examples, one REST and one SOAP. You can find more information about these new testing features over in the tool's documentation.
voice your opinion now!
webservices soap rest testing functional unit module
Volker Dusch's Blog: The UNIT in unit testing
by Chris Cornutt March 15, 2012 @ 08:24:03
Volker Dusch has a new post reminding us about what the "unit" part of "unit testing" means - small chunks of testable parts in an application.
What does the word UNIT in unit testing stand for? Think of an answer and read on! So? Did you say "A method! Because we test methods!"? If so let me offer another perspective.
He suggests that, rather than about just the methods in the class, it's more about testing the "observable behaviors" of the class. That is, anything that you could publicly use the class for and have something happen. He gives examples of this shift in focus - calling setValue and evaluating the result versus just calling the class property itself (then calling the method). He also includes a bit about testing behaviors - what happens when my script does [this] and how does that effect the overall class.
When your tests fail but the class "still works" and you need to "fix the tests" the your tests are worth a lot less as they don't really give you that cozy safety net that they should provide you with.
voice your opinion now!
unit unittesting opinion recommendation behavior method testable
PHPBuilder.com: Create a Unit Conversion Application w/the Zend_Measure Component
by Chris Cornutt February 15, 2010 @ 09:38:22
On PHPBulder.com there's a new tutorial posted showing you how to create an application that can do unit conversion with the help of the Zend_Measure component of the Zend Framework.
Performing even relatively simple conversion calculations such as from pounds to kilograms from memory can be fairly difficult, let alone calculating more esoteric conversions such as from square meters to acres. To automate this conversion process, I used the Zend Framework to create a calculator capable of easily migrating data among the most commonly used formats.
Zend_Measure lets you define the type you want to convert from and convert to based on some constants included with the component. A simple call to the "convertTo" method and you'll get your answer. Based on this he creates a simple calculator and shows you can can integrate roman numeral support in as well.
voice your opinion now!
unit convert zendframework zendmeasure tutorial
|
Community Events
Don't see your event here? Let us know!
|