Pages

Friday, November 12, 2010

Is toilet testing a form of load testing or is this just a load of crap?

When a new stadium opens everyone flushes the toilets at the same time. They hope the pipes don't break.

This sounds similar to multiple users hitting the same button at the same time in software testing.

Can we start calling this test "the flusher" or "toilet testing" or am I just full of crap?

Saturday, October 30, 2010

I just want to use your website not break it

I was reading an advertisement for free phones. We are using prepaid cell phones. I was checking the price of changing from pre paid to a monthly plan. With free phones it would cost over $400 per month for 5 phones that have unlimited minutes, unlimited data, and unlimited text messaging. Doesn't include the expensive phones I see other people using. That seems ridiculously expensive, so I can't afford to buy cell phones for everyone yet.

I had one phone in my shopping cart then added four more. When I clicked Add to Cart I got this error "An error has occurred please refresh your browser". I tried again and did not get the same error. It is very annoying when I see errors using a website. Cryptic error messages seem to follow me everywhere I go.

Friday, October 22, 2010

testing effective dates

This description is similar to the application we are testing:
  1. the employee has an effective date and an expiration date
  2. the employee is assigned to a department
  3. each department has an effective date and an expiration date
  4. the employee is assigned a badge with an effective date and an expiration date
  5. the department is the top level item, then employee, and finally badge
Effective dates of the child items should be within the start and end dates of the parent item. The application is not enforcing this rule, so these dates are allowed:

Department  1/1/2009-1/1/3000
Employee     1/1/2001-1/31/2001
Badge          1/1/2005-12/31/2006

In the real application each field also has a bit field called Blocked to temporarily shut off the ability to use each item. These bit fields are Nullable, which is wrong.  Blocked shouldn't affect the effective dates.

If you deactivate the top level item it should inactivate all child items. When an item is deactivated it sets the expiration date to today.

There is also a rule that says effective date cannot be after the expiration date  - sounds like bad news for these dates:

Department  1/1/2009-11/1/2010
Employee     1/1/2011-1/1/3000
Badge          1/1/2011-1/1/3000

After deactivating the Department Employee and Badge will generate the error message "End date cannot be before start date" and the effective dates are out of order for employee and badge:

Department  1/1/2009-10/22/2010
Employee     1/1/2011-10/22/2010
Badge          1/1/2011-10/22/2010

Thursday, October 14, 2010

Outlook Instant Search Encountered a Problem

The web application threw an error message and thought for sure it was fixed by in one of the Stored Procedures. So I searched email, but used the wrong search text. I searched for  =, !=, <, <= , >, >= or and this error message: "Instant Search encountered a problem while trying to display search results. Modifying your query may resolve this problem"


I still can't find the email. I must be remembering a different application error. Searching for an error message returned an error message. Very nice

Friday, October 1, 2010

Error Running WebTest; Build Error = The "EntityDeploy" task could not be loaded from the assembly

Today I saw an error message trying to run a web test. I added some validation rules to a web test then tried running it. Also hovered over the Server Explorer tab at the same time.

I have reproduced this error; it happens if you click Run Test while hovering over Server Explorer at the same time. The error persists until you expand Server Explorer.

Error message:
The test could not be run because of the following exception: Assembly is still being loaded. (Exception from HRESULT: 0x80131016)

Build Error:
The "EntityDeploy" task could not be loaded from the assembly C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.Build.Tasks.dll. Assembly is still being loaded. (Exception from HRESULT: 0x80131016) Confirm that the ,UsingTask> declaration is correct, and that the assembly and all of its dependencies are ready

Thursday, September 23, 2010

Uninstall errors

I am testing an application and was unable to uninstall. I was getting these errors:

  1. Error 1001. The savedState dictionary contains inconsistent data and might have been corrupted.
  2. Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> The specified service does not exist as an installed service

Kind of a long and boring story, but writing it down for future reference. I test the msi's on a Virtual Machine with SQL Server and IIS installed and undo disks enabled, so I can roll back after installing software.

The other day I made copies of this Virtual PC and installed 3 different versions of the software. Later on I found out I could not start more than one of the Virtual PCs at the same time because they all used the same machine name and MAC address.

So then I renamed the computer, reassigned the MAC address, and renamed the SQL server in 3 of the Virtual PCs. Now I have 4 Virtual PC's: one with the OS, SQL Server, and IIS and 3 more with different versions of the application.

The application would not uninstall on one of the renamed machines, so first I thought it was storing the PC name someplace in the registry. But then I remembered I tried running Repair from Add/Remove Programs before I tried uninstalling. So I tried to reproduce the error on the Virtual PC that was not renamed. It was Repair that caused Error 1001 on uninstall.

So it's best to remember exactly what you did, then verify the error can be reproduced. I really thought that bug had something to do with changing the machine name.

Thursday, September 2, 2010

foreign key constraint violation

A foreign key constraint violation can happen if you delete a row that is referenced in another table. When the constraint is violated the error message in SQL Server is "INSERT statement conflicted with COLUMN FOREIGN KEY constraint".

table named Person with an identity column PersonID
table named PersonPhones references Person.PersonID
the constraint is on the Person table

ALTER TABLE [dbo].[Person]  WITH CHECK ADD  CONSTRAINT [FK_PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[PersonPhones] ([PersonID])

The row cannot be deleted from Person if the PersonID exists in PersonPhones. The concept is the same in any RDBMS. The constraint could also be set up to automatically update and delete rows from the child table. It would look like this:

ALTER TABLE [dbo].[Person]  WITH CHECK ADD  CONSTRAINT [FK_PersonID] FOREIGN KEY([PersonID])
REFERENCES [dbo].[PersonPhones] ([PersonID])
ON UPDATE CASCADE
ON DELETE CASCADE

It's just something the program should check. If you add a new person all fields should contain a value before you can say CRUD was successful. (CRUD=Create, Read, Update, Delete) If nothing else the user should be given a more friendly error message.

Thursday, August 26, 2010

Visual Studio 2010 Coded UI Test Basic User Guide

User Guide for Coded UI Tests on Codeplex: http://tfsguides.codeplex.com/releases/view/48007

I'm still trying to understand Coded UI Tests. Can they be edited? Microsoft says not to edit the UI Map. It just seems difficult to get everything recorded correctly the first time. The guide doesn't explain how to change something after it is recorded, but on Page 8 it says "Click the “Show Recorder Steps” in order to see and edit the recorder steps". Maybe it helps to check the recorded steps before generating the code.

Tuesday, August 24, 2010

UN Site Has 3-Year Old SQL Injection

UN Site Has 3-Year Old SQL Injection

WPF applications do not have a predefined exit command

I'm testing a Windows Presentation Foundation (WPF) application. When I click the X in the corner the window is closed, but the process is still running in Task Manager. This is listed as a bug in Microsoft Connect, but was marked Closed/Postponed in 2008.

StackOverflow thread: http://stackoverflow.com/questions/1286692/wpf-standard-commands-wheres-exit

Wednesday, August 18, 2010

legal names cause application errors

I was reading about long names to find examples that I could use in testing. I read this article about Ulrika Örtegren-Kärjenmäki who was banned from a flight because her name did not fit on the Ryanair boarding pass.

So I tried her name in a web application and saw JavaScript errors. The errors didn't happen until I tried  viewing the name from other pages. Names may appear to save properly but you can't be sure until you actually try using them in all areas of the software.

Then I tried a different name with non-ASCII characters - Mötley Crüe, but did not see the same errors. So I  tried changing it to Motley üCrue. Guess what? The same JavaScript errors were back.

The application error happens when the first character of the last name contains an umlaut.

Saturday, August 14, 2010

strange error message

This error happened in SQL Server 2008 when you click New Query after editing a SQL script and are not connected to a server.











Steps to Reproduce:

1. edit a SQL script through Windows Explorer (open with SQL Management Studio)

2. click Cancel in the connect to database engine dialog

3. click New Query

That what usede to happen anyway. Today I cannot get the error to happen, so I am eith er missing a step or the bug was fixed. Now when I click New Query it prompts you to connect to a database.
Posted by Picasa

Monday, May 10, 2010

special user logins

Sometimes they are necessary. They create special scenarios that don't seem to be handled very well.

These are some of the problems I have seen with them:

1) Login 1000 is reserved as the "Administrator", but not stored in the database table. What happens if I make a new login 1000 and assign it read only permission? Hopefully the application prevents that, but sometimes it does not.

2) Administrator Login still has the menu option to allow its password to be changed. It definitely should allow the default password to be changed, just make sure the old one doesn't work too. Otherwise changing the default password was pointless.

3) Administrator Login is stored in the database table, but it can be deleted or renamed. Now I lost my special user.

4) Administrator Login 1000 is enabled only when the userlogin table is empty. When a login is deleted it marks a deleted flag true so the audit history can be kept instead of deleting the row. If all users are deleted nobody can get into the software because it only checks if the table is empty instead of also checking if all users are marked deleted.

5) Some special logins have special passwords. They could be generated using a formula or some other method. Does the special password work correctly?

6) The special user uses a weak password and it cannot be changed. Why even make a special user if it will be insecure? They would be better off with no logins at all.

7) The special logins are stored separately from the regular logins; in a text file, in the Windows registry, or in an Access database.

8) New menus were added to the program, but they weren't added for the special user. Now the user is no longer an Administrator.

Monday, April 26, 2010

Running MSI on Virtual Machine and never ending message about disk space

I was running an msi on a virtual machine, but it kept displaying this message: "please wait while the installer finishes determining your disk requirements." I found an MSDN blog post that said to run the msi from the command line or restart the Windows Installer service.

Friday, April 23, 2010

VS2010 warning in Class Library for custom rules

I installed Visual Studio 2010 Ultimate. They added some new features to the web tests which are really awesome. My favorite is in the Web Test results, new toolbar button that says "go to Web Test" and it takes you directly to the Request. It was hard to figure out which request caused the failure sometimes. Loops and Conditions can now be added to the web tests. Actually Web Tests were renamed to Web Performance Tests. The tests can now check response times, which looks promising.

I have a Class Library for Custom Extraction Rules and Custom Validation Rules. I got warnings when I built the Solution in 2010, but I did figure out why eventually and fixed them. The warning says that overriding RuleName and RuleDescription is now obsolete. Here is that actual message:

warning CS0672: Member 'CustomValidationExtractionRules.QueryStringExtraction.RuleName' overrides obsolete member 'Microsoft.VisualStudio.TestTools.WebTesting.ExtractionRule.RuleName'. Add the Obsolete attribute to 'CustomValidationExtractionRules.QueryStringExtraction.RuleName'

I didn't know what they meant by add the obsolete attribute to RuleName (I'm not a programmer), but here's how I figured it out. Viewed the Class Library in the Object Explorer and browsed to CustomValidationExtractionRules> QueryStringExtraction> Base Types> Extraction Rule> RuleName. Under Summary it says "This method is no longer used. Use the System.ComponentModel.DisplayNameAttribute on the class to set a display name for this rule." So I looked up System.ComponentModel.DisplayNameAttribute and used the example to figure out I need to add two properties above the class definition, like this:

[Description("Demonstrates DisplayNameAttribute.")]
[DisplayName("RenamedProperty")]
public bool MisnamedProperty

Also needed to add "using System.ComponentModel;"

I'm a tester, not a programmer, but I'm learning.

Tuesday, April 13, 2010

change of scenery

Today I had a checkup at the eye doctor and they dialated my eyes. I still went to work, but it was pretty hard to see the monitor. I turned down the brightness. I was able to find 10 bugs that I should have seen a long time ago.

I'm being monitored for glaucoma, but so far everything is fine. I only have high pressure in my eyes. Both were 29. The doctor said I don't need medicine until something changes with my vision.

This reminded me that I need to make a better effort to see things differently. I've been training myself to find software bugs, but maybe I'm not finding enough of the obvious issues.

Here's some things to try that might help you see the software in a new way: rearrange your desk, change the monitor resolution, change the brightness, change the Windows theme, or change browser skins.

Thursday, January 14, 2010

Web Service Testing

Yesterday I read about a open source project used for testing Web Services. It was a discussion thread at a LinkedIn Group. Someone asked everyone to list their favorite automated testing tools.

This utility is called soapUI. I recommend it for testing web services. Here's what I have done with it so far; create a new project, point to the WSDL, generate the test suite and mock service, edit a request, and then submit request to the endpoint URL.

It reminded me how I learned software testing. I read books, articles, forum posts, and try all kinds of tools, utilities, and scripting languages. I'm still learning all the time.