Tag Archives: testing

Testing multiple values efficiently in PHP

Questions: Okay, so I have a few possible matches that I need to test. It can either equal A or B, so the obvious way to test it would be something like this: if($val==”A”||$val=”B”){ echo “yup”; } I was just wondering if their were an easier way to test values without restating the variable for… Read More »

Testing if a network in cidr notation overlaps another network

Questions: I’m searching for a php algorithm that efficiently test if one cidr notated network overlaps another. Basically I have the following situation: Array of cidr adresses: $cidrNetworks = array( ‘’, ‘’, etc. ); I have a method that adds networks to the array, but this method should throw an exception when a network is… Read More »

Performance/Load Testing PHP / Coldfusion Spreadsheet Web Processing?

Questions: PHP Pear:PHPExcel vs PHP:PHP-Excel-Reader vs Coldfusion:CFspreadsheet vs Railo:CFSpreadsheet. Has anyone done any comparison performance or load tests for large/frequent data-set imports to databases? If so, what do the performance comparisons look like? I’m hoping someone already has specific time/resource metrics. Also open to any possible alternative spreadsheet processing libraries that can serve up web… Read More »

Unit testing with Excel workbook

Questions: I’m starting to get into unit testing more. I have a project where Excel is the “engine” and it can’t be taken out (at this time). I need to provide the workbook with various inputs, run a macro in the workbook, and then collect the results. It’s a huge nasty workbook so taking anything… Read More »

Testing for NULL

Questions: If I run: Sub dural() MsgBox ActiveSheet.Cells.HasFormula End Sub It will display True if all the occupied cells in the worksheet have formulas, and it will display False if none of the occupied cells in the worksheet have formulas. However if some of the occupied cells have formulas, the documentation says the property will… Read More »

I need good tool for database unit testing

Questions: I’ve tried to test SQL Server database stored procedures (write tests like unit) using Visual Studio 2010 testing tool but it is very inconvenient. Is there any another more convenient tool for testing database stored procedures? Answers: Check out TSQLUnit for an open source, SQL Server unit testing app. And there are several more… Read More »

Setting up a diverse database testing environment

Questions: I’m writing some code that needs to work against an array of different database products. MySql Sql Server 2000 to 2008 PostgreSQL Oracle 9i & 10g Jet 4.0 (MS Access) MSDE Sybase Adaptive Server Anywhere Sybase Sql Anywhere Progress OpenEdge We have a set of generic integration tests that we need to run against… Read More »

Testing for whitespace in SQL Server

Questions: I’ve got some blank values in my table, and I can’t seem to catch them in an IF statement. I’ve tried IF @value = ” and if @value = NULL and neither one catches the blank values. Is there any way to test whether or not a varchar is entirely whitespace? AHA! Turns out… Read More »