Test Cases Flashcards
Other benefits of test cases include:
Test cases ensure good test coverage
Help improve the quality of software,
Decreases the maintenance and software support costs
Help verify that the software meets the end user requirements
Allows the tester to think thoroughly and approach the tests from as many angles as possible
Test cases are reusable for the future – anyone can reference them and execute the test
What is User Story?
Application is divided into small pieces called User Story.
What is Test Case?
A test case is developed for a particular test scenario in order to verify compliance against a specific requirement.
A test case is a document that has:
- a set of test data
- preconditions
- expected results
What are the 2 types of test cases?
Positive Test Cases and Negative Test Cases
Positive Test Cases
A type of testing which is performed on a software application by providing the valid data sets as an input.
It checks whether the software application behaves as expected with positive inputs or not.
Positive testing is performed in order to check whether the software application does exactly what it is expected to do.
Negative Test Cases
a testing method performed on the software application by providing invalid or improper data sets as input.
It checks whether the software application behaves as expected with the negative or unwanted user inputs.
The purpose of negative testing is to ensure that the software application does not crash and remains stable with invalid data inputs.
How To Write a Test Case in Software Testing?
Preparing to write a test case:
Check if a test case already exists. If yes, consider updating test case, rather than writing a new one.
Make sure the test case has certain characteristics like accuracy, tracing, repetition, re-usability, and independence.
Consider all the different scenarios possible before writing.
Give yourself enough time to write test cases.
Benefits of Writing Test Cases
The key purpose of a test case is to ensure if different features within an application are working as expected.
It helps tester, validate if the software is free of defects and if it is working as per the expectations of the end users.
How do User story, and test cases start?
User Story
As a , I want so that
As a user, I want to login my account
Test Case
Validate that user is able to login to the account
Best Practices To Write Good Test Case
Easy to understand and execute
Create Test Cases with End User’s perspective
Use unique test case id
Have a clear description
Add proper pre & postconditions
Specify the exact expected result
Test cases should be reusable & maintainable
Utilize testing techniques
Get peer review
Types of Test Cases
Test Cases on the Excel
Test Case on the JIRA
Test Cases with Gherkin Language
What is BDD?
BDD is a way for software teams to work that closes the gap between business and technical people by:
Encouraging collaboration across roles to build shared understanding of the problem to be solved
Working in rapid, small iterations to increase feedback and the flow of value
Producing system documentation that is automatically checked against the system’s behaviors
Gherkin Reference
Gherkin uses a set of specialkeywordsto give structure and meaning to executable specifications.
Each keyword is translated to many spoken languages; in this reference we’ll use English.
BDD Example
Gherkin Language
GIVEN Defines the preconditions that hold before an event or operation.
AND Identifies the intermediary event
WHEN Identifies an event and operation
THEN Identifies the post conditions that hold after the event or operations
EXAMPLE: GIVEN user is on the Login page AND user enters the credentials WHEN user clicks on the login button THEN user navigates to the Home Page