Showing posts with label Quality. Show all posts
Showing posts with label Quality. Show all posts

Sunday, July 17, 2022

Taking Screenshots in automation

 Some of the scenarios we may need to capture a screenshot using Selenium WebDriver are

i. Application issues
ii. Assertion Failure
iii. Difficulty to find Webelements on the web page
iv. Timeout to find Webelements on the web page

Tosca

Take Screen Shot In Tosca Testsuite

A standard module is provided by tricentis to take screenshot. It is present in standard modules. TBox TakesScreenshot

Selenium

Selenium provides an interface called TakesScreenshot which has a method getScreenShotAs which can be used to take a screenshot of the application under test.

Syntax to capture and save the screenshot.
File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

Syntax to store it in our local drive

FileUtils.copyFile(screenshotFile, new File("filename_with_path"));

to capture full page screenshot using Selenium WebDriver:

What is aShot?
aShot is a WebDriver Screenshot utility. It takes a screenshot of the WebElement on different platforms (i.e. desktop browsers, iOS Simulator Mobile Safari, Android Emulator Browser).

aShot might be configured to handle browsers with the viewport problem. This gives a screenshot of the entire page even for Chrome, Mobile Safari, etc

Add this jar file in to your project. Note: Select Project and Right click on the Project – Go to ‘Build path’ – Go to ‘Configure build path’ – Click on ‘lib’ section – Add external jar

Screenshot fpScreenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver);

                  ImageIO.write(fpScreenshot.getImage(),"PNG",new File("D:///FullPageScreenshot.png"));

To Capture Screenshot of Failed Test Cases Using Selenium WebDriver

If a script fails, we need to know where was the error in script. Solution for this is to capture a screenshot of webpage when the test case fails. We could easily identify where exactly the script got failed by seeing the screenshot.

To achieve this, we could place the entire code in try-catch block. Which means placing the test steps in try block and screen capture statement in catch block. If a test step fails in the try block then it goes to the catch block and capture a screenshot of the web page.

 

UFT/QTP 

Dim ScreenName

  On Error Resume Next

  ScreenName = " "
  
  CurrentTime = "_Test_Case"&"_"& Day(Now)&"_"& Month(Now)&"_"& Year(Now)&"_"&

   Hour(Now)&"_"& Minute(Now)&"_"& Second(Now)

  ScreenShotName = "Name_of_the_Screen" &  CurrentTime & ".png"

  ScreenName ="Path where the Screenshot needs to be stored"&"\"&ScreenShotName

  Desktop.CaptureBitmap ScreenName,True

 

 

Wednesday, May 23, 2012

Definations- Quality Related

Here, some of the definations related to Quality.
  1. Quality : The totality of features and characterstics of a product or service that bear on its ability to satisfy stated or implied needs.
  2. Quality Audit : A systematic and independant examination to determine whether quality activity and related results comply with planned arrangments. The audit also determine whether these arrangements are implemented effectively and are suitable to achieve objectives.
  3. Quality Manual : The top level document defining the quality system.
  4. Quality Plan : A document setting out the specific quality practices, resources and sequence of activities relavent to a particular product service, contract or a project.
  5. Quality Policy : The overall intentions and direction of an organization regarding quality as formally expressed by top managment.
  6. Quality Records - written records that are retained in accordance with requirements of ISO 9001.
  7. Quality System : The organizational structure responsibilities, procedures, process and resurces for implementing quality management.

Sunday, March 20, 2011

Quality Assurance & Quality Control


Quality Assurance
All the planned and systematic set of activities (facilitation, training, measurement and analysis) implemented within the quality system to provide:
  • Confidence that the project will satisfy the relevant quality standards
  • Meet user needs
  • Conform to specified requirements
Quality Control
The process by which product quality is compared with applicable standards, and the action taken when nonconformance is detected.
  • Its focus is defect detection and removal.
  • The performance of these tasks is the responsibility of the people working within the process.

Quality Control Vs Quality Assurance
Quality Control is directed toward detecting and correcting defects. 
Quality Assurance is directed toward preventing defects from occurring
QA is QC over OC
 
Quality Control
Quality Assurance
Definition
QC is checking at the end of some development process (e.g.- a design activity ) that we have built quality in
QA is having an overall development and management process that provides right environment for ensuring quality of final product.
Description
QC is like testing a module against RS or design document , measuring response time and throughput
QA is checking that a process is properly planned and executed and thus maintaining high quality.
What it does
It is oriented towards ‘detection and correction’.
It is oriented towards 'prevention’
Stages
  1. Define features and levels
  2. Define feature check procedure
  3. Carrying out the check procedure
  4. Record the result take and record any corrective action taken.
  1. Determination of quality policy through Quality Management System
  2. Checking that predetermined QC activities are being properly taken care of.
Best carried out  on
Products
Processes
Phase of Implementation
QC depends on SDLC model. E.g. QC is done in Testing phase of waterfall model
QA does not dependent on SDLC model
Technique
Structured walkthrough and Functional Testing
Quality policy defined and generally implemented in the form of Quality Management System is used to carry out QA.

 

 

 

Quality & Quality Attributes



What Is Software Quality?

Quality in fact
o   Doing the right thing, in right way, the first time
o   Doing it on time within budget
 Quality perception
1.       Producers view of quality
o   Meets specifications and delivering the right product
o   Non-variance from specification
o    Is maintainable
2.       Consumers view of quality
o   Fit for use and satisfying our customer needs
o   Non-variance from what is desired
o   Quality Attributes
Quality Attributes
 Correctness
The extent to which a program satisfies its specifications and fulfils the user’s mission and goals
Reliability
The extent to which a program can be expected to perform its intended function with the required precision

Efficiency
The amount of computing resources and code required by a program to perform a function
Integrity
The extent to which access to software or data by unauthorized persons can be controlled

Usability
The effort required for learning, operating, preparing input, and interpreting output of a program

Maintainability
The effort required for locating and fixed an error in an operational program

Testability
The effort required for testing a program to ensure it performs its intended function

Flexibility
The effort required for modifying an operational program

Portability
The effort required for transferring a program from one hardware configuration and/ or software system environment to another

Reusability
The extent to which a program can be used in other applications

Interoperability
The effort required to couple one system with another


Thursday, January 27, 2011

QA Process Model- ETVX


Quality in the process
A quality process has the right inputs and performs the right actions to produce outputs that meet the needs of customer processes.
Definitions of quality thus include:
·       Fitness for purpose
·       Right output, right time, right place
·       Customer satisfaction
ETVX

The Entry-Task-Validation-Exit (ETVX) model views processes within the context of:
1.    Input or triggers
2.    Tasks (also called Procedures)
3.    Controls
4.    Constraints
5.    Output

There are four places where the quality can be specified and checked:
·      Entry criteria define what inputs are required and what quality these must be to achieve the exit criteria. Entry criteria should be communicated to supplier processes, to become their exit criteria. If supplier processes are sufficiently well controlled, then there is no need to check inputs.
Entry Criteria: Inputs or Triggers: Processes are initiated by either inputs or triggers. An input is usually an output from a preceding process; a trigger is an event that invokes the process. In either case, in input or trigger, an associated list of entry criteria must be satisfied in order for the process to commence.
·      Task definitions specify the actions within the process.
Tasks (also called procedures) are the action components of a process. In the ETVX model tasks follow a sequence that has a validation step. This step ensures that the process does not pass its output to another process or terminate until all exit criteria have been satisfactorily met.
·      Validation definitions identify test points within the process and define the tests and criteria for checking at these points. This enables problems to be caught close to their cause, reducing rework and scrap costs, and enabling problem causes to be addressed.
This is a process checkpoint that occurs after the task(s) associated with the process have been completed. This checkpoint is also known as quality gate – its purpose is to ensure that the task(s) have produced an output that meets specifications and/or requirements of the process. A failure at the validation checkpoint generally requires re-performing the process tasks.
·      Exit criteria define what outputs are required and what quality these must be to meet the needs of customer processes. Exit criteria may be derived from the entry criteria of customer processes.
All conditions that must be present and/or satisfied before a process can successfully terminate. Closely coupled to exit criteria is the output of the process itself. i.e, what the process was designed to produce. All processes produce an output.
·         Controls: Process controls are limits that have been purposely placed on the process to prevent undesirable outcomes. Example include:
Policies
Checkpoints
Audits and integrity checking (i.e. cyclic redundancy checks, etc)
Error detection and correction processes.
·         Constraints: Limitations imposed on a process are called constraints. Example include technical capabilities, available time frames, resources, transmission speeds, etc.
The key difference between a control and a constraint is that a control is designed into the process to produce or effect a desirable outcome, while a constraint is a limitation to the process (or environment) that may impact on the effectiveness and/or efficiency of the process.

Together, these make up what is known as the ETVX model (as below), which can be used to define the process and the quality required within it completely.


 

Fig. 1. The ETVX model

In process improvement, it can be useful to apply this model to processes that are suspected of being troublesome, in order to identify measures to identify specific problems.