Black box testing - Testing max length of values stored in database by stored procedure

StackOverflow https://stackoverflow.com/questions/13135471

  •  21-07-2021
  •  | 
  •  

質問

I faced this issue a few days back, and I am still struggling with the answer.

We were given a functionality to test for uploading images for a selected car. There was only a Browse button, and an Upload button in the page.

We had to test if the image name is getting saved in the format

(make year-car make-car model-car version-unique ID.jpg)

We tested it for a number of different cars and functionality was working fine.

But, we missed out one thing.

There was a stored procedure created for saving these image URLs to the database (it was not shared with us. We normally do black box testing.)

Database column being used to save was of size 100 characters, but the stored procedure was storing image URLs in a variable of length 50 characters

Now, the Image names and URLs were getting saved properly for most cars.

But, for cars where Image URLs got greater than 50 chars in length, data got truncated while saving in the database.

This resulted in a major issue in production, and I was left baffled by how I could have caught this earlier.

Was this a bug that could have been caught by black box testing, or this is the kind of bug you learn to check by experience?

役に立ちましたか?

解決

This is poor design which could have been found by black box testing. The database designers got it about right at 100 chars for unknown/not totally sure input. The stored procedure should be designed to match database. This should have been found by Boundary Value Testing.

Boundary value testing is focused on the values at boundaries. This technique determines whether a certain range of values are acceptable by the system or not.It is very useful in reducing the number of test cases. It is mostly suitable for the systems where input is within certain ranges.

Ie length of .jpg <=100 chars

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top