 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
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
Luis Atencio: Notes on Continuous Delivery - Continuous Integration
by Chris Cornutt March 26, 2013 @ 12:20:31
Luis Atencio has posted the third part of his continuous delivery series (parts one and two), this time with a focus on continuous integration as a part of the process.
This is a continuation from my previous post and overall the series on Continuous Delivery. If you haven't been following, that's okay, every topic is self-contained, so read along. The contents of these posts are taken from the book titled "Continuous Delivery" by Humble and Farley (resources below) overlaid with my own professional experience. In this article, we talk a bit more about Continuous Integration (CI) and some practices developers should follow to ensure a smooth environment.
He talks some about what "continuous integration" is and how much it relies on an automation of the process around your delivery of software. He mentions integration of testing (unit/acceptance/integration) and how it can help discover issues early. He includes a list of essential practices that come along with the idea of CI integration including:
- Don't check in on a broken build
- Keep a stable build at all times
- Anticipate being able to revert your changes
- Using TDD
- Distributed Version Control
He also recommends using any downtime (like waiting on a build to "go green" again) to take a few minutes away from the code - it can benefit you and your code.
voice your opinion now!
continuous delivery overview integration build deploy
System Architect: Integrate PHP application with Solr search engine
by Chris Cornutt March 12, 2013 @ 12:01:43
On the "System Architect" site there's a recent post showing you how to integrate PHP and Solr, the searching tool from the Apache project.
So why do you need a search engine, is database not enough? If you create a small website it might not matter. With medium or big size applications it's often wiser to go for a search engine. Saying that, even a small websites can benefit from Solr if you desire a high level of relevance in search results.
Their example involves an ecommerce website and a search for a term (iPhones) and how difficult it could be to match against the possible multiple variations on the models. Solr makes this kind of searching easier. He shows you how to get a Solr instance all set up and configured as well as the PHP PECL extension from here. A sample PHP script is also included showing connecting to Solr, inserting a new document and searching for a simple query of "hello".
voice your opinion now!
solr search engine tutorial integration pecl extension
Till Klampaeckel: Continuous Integration Automated database setup with Doctrine on Travis-CI
by Chris Cornutt August 14, 2012 @ 10:55:57
Till Klampaeckel has a new post to his site showing how you can use the external continuous integration system Travis-CI to handle automated database testing for your PHP app using Doctrine.
Testing is important - most people understand that by now. A lot of people write tests for their open source code already, but in-house testing is still hard. [...] While I prefer to run my database tests against a SQLite in memory database, there are these edge cases, where I work with multiple database or I write a direct query (and by-pass the ORM-magic). In these cases I need to have that database server available in my test environment! The following blog posts explains how to solve these things with Travis-CI. I will walk you through the setup on Travis-CI's business service. But most of this applies to their open source offering as well.
He's broken it up into a few different steps - the setup and configuration of the ".travis.yml" file, adding in a "composer.json" file with the needed dependencies and the recommendation of a "phpunit.xml" in your project's root. He shows how to use Doctrine's "SchemaTool" utility to generate his schema off of the comments on his entities (instead of checking in SQL). This setup them gives him access to Doctrine's EntityManager object in his tests and he can go from there. If you're thinking about doing something similar, check Travis' list of supported databases before you do anything, just to be sure.
voice your opinion now!
database testing autmation travisci continuous integration tutorial doctrine
TrueLogic.org: Integrate the Mailchimp API with your PHP application
by Chris Cornutt July 30, 2012 @ 11:17:21
In this new tutorial to the TrueLogic.org site, they show you how to use the Mailchimp (using a library) from your application.
For those unfamiliar with Mailchimp it is an online service for handling subscribers and newsletters. It is mainly used to handle subscription lists and sending newsletters via its Mailchimp API which has wrappers and integration features for various languages/platforms. [...] In this article we will take a quick look at how to integrate this with your PHP application. If you want a detailed reference on integration then its better to look at the official API documentation. Here, we just want to give a simple and practical explanation on how to go about it.
Once you've gotten an API key, you can follow along with the tutorial. They show you how to subscribe to lists, create campaigns, unsubscribe from a list and delete a campaign.
voice your opinion now!
mailchimp tutorial api integration
We Love PHP Blog: Using V8 Javascript engine as a PHP extension
by Chris Cornutt July 25, 2012 @ 11:50:36
From the "Web Love PHP" blog there's a new post showing how to use the V8 Javascript engine as a PHP extension in your application.
Just got to something described as: This extension embeds the V8 Javascript Engine into PHP. It is called v8js and the documentation is already available on php.net, examples and the sources are here. V8 is known to work well in browsers and webservers like node.js, but does it work inside PHP? YES!
They show how to get it installed (on Ubuntu) via a PECL install and a test script with some Javascript in a string variable that's parsed by the "executeString" function on a V8 object. There's also an example of how you can mix the functionality between the two - a simple script that uses a PHP PDO object fron inside the Javascript to perform a SQL query and set some information into the session.
voice your opinion now!
v8 javascript extension integration tutorial
|
Community Events
Don't see your event here? Let us know!
|