Chapter-6: Software Testing Is An Investigation Conducted To Provide Stakeholders With Information About

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

CHAPTER-6 TESTING
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.[1] Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs (errors or other defects). Software testing can be stated as the process of validating and verifying that a software program/application/product: 1. 2. 3. meets the requirements that guided its design and development; works as expected; and can be implemented with the same characteristics.

Software testing, depending on the testing method employed, can be implemented at any time in the development process. However, most of the test effort occurs after the requirements have been defined and the coding process has been completed[1]. As such, the methodology of the test is governed by the software development methodology adopted.

6.1SOFTWARE TESTING LIFECYCLE:


CONSISTS OF SIX (GENERIC) PHASES: Test Planning Test Analysis Test Design Construction and verification Testing cycles Final Testing and Implementation

6.1.1 TEST PLANNING:


This the phase where Project manager has to decide what changes need to be tested, do the project have the appropriate budget etc. Naturally, proper planning at this stage would greatly reduce the risk of low quality software. This planning will be an ongoing process with no endpoints.
Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

6.1.2 TEST ANALYSIS:


Once test plan is made and decided upon, next step is to delve little more into the project and decide what types of testing should be carried out at different stages of the project. The Software Test Plan (STP) is design to prescribe the scope, approach, resources and schedule of all testing activities.

6.1.3 TEST DESIGN:


Test Plans and Cases which were developed in the analysis phase are revised. Functional validation matrix is also revised and finalized. In this stage risk assessment criteria is developed.

6.1.4 CONSTRUCTION AND VERIFICATION:


In this phase we have to complete all the test plans, test cases, complete the scripting of the automated test cases .Stress and Performance testing plans needs to be completed.

6.1.5 TESTING CYCLES:


In this phase we have to complete testing cycles until test cases are executed without errors or a predefined condition is reached. Run test cases-> Report Bugs -> revise test case (if needed) -> add new test case (if needed) -> bug fixing ->. Retesting (test cycle 2, test cycle 3).

6.1.6 FINAL TESTING AND IMPLEMENTATION:


In this we have to execute remaining stress and performance test case, documentation for testing is completed/updated, provide and complete different matrices for testing. Acceptance, load and recovery testing will also be conducted and the application needs to be verified under production conditions[2][1].

6.2 Post Implementation:


In this phase, the testing process is evaluated and lessons learnt from that testing process are documented.

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

6.3 TEST CASES 6.3.1.1 TEST CASE-EMBEDDING PROCEDURE


Action performed Input Host image Action On logo image Input any other file except image files Action Performed The .txt file is fed into software for embedding Invalid output Showing Invalid outputs Required Output Error message: Invalid input, go to welcome screen Remarks

The desired output found so test successful

6.3.1.2 TEST CASE -EMBEDDING PROCEDUREAction performed Input Host image Action On logo image Input logo image greater in dimension w.r.t host image Action Performed The large sized logo file is fed into software for embedding Invalid output Showing Invalid outputs Required Output Error message: Choose proper image size, go to welcome screen Remarks

The desired output found so test successful

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

6.3.2.1 TEST CASE- EXTRACTION PROCEDURE


Action performed Action On nonwatermarked image The non watermarked image is fed into software for extraction Invalid output Required Output Remarks

Input Nonwatermarked image

Showing Invalid outputs

Error message: Choose watermarked image, go to welcome screen

The desired output found so test successful

6.3.2.2 TEST CASE- EXTRACTION PROCEDURE


Action performed Action On nonwatermarked image The non watermarked image is fed into software for extraction Invalid output Required Output Remarks

Input Nonwatermarked image

Showing Invalid outputs

Error message: Choose watermarked image, go to welcome screen

The desired output found so test successful

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

6.4 PERFORMANCE ANALYSIS


Several Functions are used to qualify the watermarking algorithm, examining tests on the resulted watermarked image. The performance of any watermarking project is measured by three (4) following parameter as mentioned below:

6.4.1 Impercebtibility
The imperceptibility of the watermark is tested through comparing the watermarked image with the original one.Several tests are used in this regard

6.4.1.1 Mean Squared Error


Mean Squared Error (MSE) is one of the earliest tests that were performed to test if two pictures are similar. A function could be simply written according to equation(3).

6.4.1.2 PSNR
Pick Signal to Noise Ratio (PSNR) is a better test since it takes the signal strength into consideration (not only the error). Equation (4) describes how this value is obtained.

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

Fig: showing PSNR and MSE value for attacked and non-attacked images

6.4.2 ROBUSTNESS
This is by far the most important requirement of a watermark. There are various attacks, unintentional (cropping, compression, scaling) and unintentional attacks which are aimed at destroying the watermark. So, the embedded watermark should be such that it is invariant to various such attacks. They are designed to resist any manipulations that may be encountered. All applications where security is the main issue use. The robustness of a watermark method can be evaluated by performing attacks on the watermarked image and evaluating the similarity of the extracted message to the original one.

6.4.2.1 Compression Attack


The most used image compression is definitely JPEG. In MATLAB, for compressing an image to different quality factors, the image should be created from a matrix and be reread:

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

Fig: Original watermarked image at 60% JPEG Compression

Fig: Extracted Logo

6.4.2.2 Noise Attack


Action performed Action On Watermarked image Attack with different kinds of noise and remove with specific filter Action on Output Invalid output Required Output Remarks

Input Watermarked image

The noise attacked watermarked image is fed into software for extraction

The logo image is highly distorted

The logo image can be recovered without severe distortion

The desired output found so test successful

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

TEST CASE: 6.42.2.1 Noise_attack_ salt and pepper noise

Fig: Original Image

Fig: Logo Image

Fig: Watermarked_Image

Fig: Attacked_watermarkimage

Fig: Recovered_logo

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

TEST CASE: 6.4.2.2.2 NOISE_ATTACK_ POISSON NOISE

Fig: Recovered Logo

TEST CASE: 6.4.2.2.3 NOISE_ATTACK_ SPECKLE NOISE

Fig: Recovered Logo after treated with noise

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

TEST CASE: 6.4.2.2.4 NOISE_ATTACK_ GAUSSIAN NOISE

Fig: Recovered logo after treated with noise

HISTOGRAM ANALYSIS

Dept Of Computer Science & Engineering, NIT Agartala

DIGITAL WATERMARKING IN SPATIAL AND FREQUENCY DOMAIN

TESTING

6.4.2.3 Cropping Attack


Cropping attack is simply cutting off parts of the image. If the algorithm is non-blind, it is better to bring back those parts from the original image for a better recovery of the message.

6.4.3 CAPACITY
. The capacity of the watermark method can be easily tested by increasing the length of the watermarking message. Any watermarking method is not capable of holding more than a certain length of message or it will endanger its imperceptibility.

Dept Of Computer Science & Engineering, NIT Agartala

You might also like