CartSure Business Logic Testing using Decision & State Models

Business Scenario

Welcome!

You are now learning advanced testing techniques in the CartSure project as a Software Tester.

After completing functional testing, retesting, and regression testing activities, your manager introduces you to another important area of software testing today — Business Logic Testing using Decision & State Models.

Before testing complex workflows, it is important to understand how the application behaves under different conditions and user actions.

In real-world applications like CartSure, business rules and workflow validations play a major role in ensuring accurate system behaviour. Based on these business rules and state transitions, you then design logic-based test cases to validate different scenarios and conditions within the application.

 

These activities help ensure that CartSure’s business logic remains accurate, reliable, and aligned with real-world user expectations.

So, today you will learn how to apply Decision Table Testing and State Transition Testing techniques to design logic-based test cases and validate business workflows in the CartSure project.

Pre-Lab Preparation

Topic: Testing Techniques

1)Black Box vs White Box And Equivalence Partitioning
2)Boundary Value Analysis And Decision Table & State Transition

Task 1: Create Decision TAble

Identify Conditions

 

1

1

git pull origin branchName

Git Pull

Example: Checkout Order Placement

Create Decision Table

1

3

CONDITIONDESCRIPTION
C1Stock Available(Yes/No)
C2Payment Successful(Yes/No)
C3Coupon Valid(Yes/No)

Identify Actions

1

2

ACTIONDESCRIPTION
A1Place Order
A2Apply Discount
A3Show Payment Error
A4Show Out Of Stock Error

Identify System States (Example: Order Placement Workflow)

1

1

RULEC1:StockC2:PaymentC3:CouponActions
R1YESYESYESPlace Order + Apply Discount
R2YESYESNOPlace Order(No Discount)
R3YESNO-Show Payment Error
R4NO--Show Out Of Stock Error

Task 2: Create Decision TAble

STATEDESCRIPTION
BROWSINGUser is Viewing Products
CARTUser has Added Product to Cart
CHECKOUTUser Proceeds to Checkout
PAYMENTUser Enters Payment Details
ORDER CONFIRMEDPayment Successful, Order placed
PAYMENT RETRYPayment Failed, User Retries
FROM STATEACTION/EVENTTO STATE
BROWSINGAdd ProductCART
CARTProceed to CheckoutCHECKOUT
CHECKOUTMake Payment PAYMENT
PAYMENTPayment SuccessfulORDER CONFIRMED
PAYMENTPayment FailedPAYMENT RETRY
PAYMENT RETRYRetry SuccessORDER CONFIRMED
CARTRemove ProductBROWSING

Identify Transitions

1

2

Task 1: Understanding BRD

Before you start building anything, you need to clearly understand what the client actually wants.So, let’s begin by understanding the BRD (Business Requirement Document) shared by the client.

BRD Full Form is Business Requirement Details.BRD like a plan for building a house. This plan helps the builder understand what to build.In the same way,BRD tells developers what the client wants to build

Click to download BRD : BiteBox_BRD.pdf

Activity

After going through BRD list down the Core Features and  Web Pages in the tabulated Format as shown Below.

Pre-Lab Preparation

  • Explore different restaurants
  • View food items and menus

  • Add items to cart

  • Place orders online

In this task, you will begin by understanding the business problem and the structure of the dataset provided to you. This is a crucial first step in any data analysis workflow.

Task 1: Understanding BRD

Before you start building anything, you need to clearly understand what the client actually wants.So, let’s begin by understanding the BRD (Business Requirement Document) shared by the client.

BRD Full Form is Business Requirement Details.BRD like a plan for building a house. This plan helps the builder understand what to build.In the same way,BRD tells developers what the client wants to build

Click to download BRD : BiteBox_BRD.pdf

Activity

After going through BRD list down the Core Features and  Web Pages in the tabulated Format as shown Below.

Task 1: Understanding BRD

Before you start building anything, you need to clearly understand what the client actually wants.So, let’s begin by understanding the BRD (Business Requirement Document) shared by the client.

BRD Full Form is Business Requirement Details.BRD like a plan for building a house. This plan helps the builder understand what to build.In the same way,BRD tells developers what the client wants to build

Click to download BRD : BiteBox_BRD.pdf

Activity

After going through BRD list down the Core Features and  Web Pages in the tabulated Format as shown Below.

Col 1Col 2Col 3
Row 1
Row 2
Row 3

Formula

Profit = Revenue - Cost

Task 2: Create WireFrame

Now that you understand the requirements, don’t jump into coding yet. Before development, we always visualize the layout.

Now lets  create a simple wireframe for the homepage.

A wireframe is like a layout plan of a house. Before building, you decide where rooms, doors, and windows will be placed.Similarly, a wireframe helps you plan where elements like headers, images, and buttons will appear on a webpage—before adding design or colours.

Task 3: Code Editor Installation

Good work on completing the planning phase.

Now we will start development. Before that, make sure your system is ready with the required tools.

In this step we will install the VS code editor that will help to Write code efficiently,Organize files , Run and test your application

Go to the visual studio code official website  

1

Click to download Homepage Wireframe : Homepage Wireframe

Choose your operating system(windows / Mac) and download the installation file.

Double click on the download app and Accept the agreement and click next

2

It is a long established fact that a reader will be distracted

b

Sub Steps

a

 Double click on the download app and Accept the agreement and click next 

public class MathSample {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        int sum = x + y;
        
        System.out.println("The sum is: " + sum);
    }
}
public class MathSample {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        int sum = x + y;
        
        System.out.println("The sum is: " + sum);
    }
}

public class MathSample {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        int sum = x + y;
        
        System.out.println("The sum is: " + sum);
    }
}

 

Great job!
You have successfully completed your first lab on BiteBox Project Onboarding.

In this lab, you have: Understood the BRD, Created a wireframe, Set up your development environment, Organised your project structure, Run your first program

You are now ready to move to the next stage of development

Checkpoint

Next-Lab Preparation

   Git Push

git push origin branchName

Topic : Working with a Text and Listin HTML

1) Power of HTML text tags
2) Customizing your style with CSS
3) Listing it right using HTML
4) HTML Link up , attributes of tag, block vs inline elements

Text box Width : 887
Business Scenario, Pre-lab Preparation, Next-lab Preparation, Task, Activity, Checkpoint : 90%.
Steps : 1,2,3 [Sub Steps - a,b,c]
Normal Text, Topic Name : 80%
Subtopic : 70%
Code Box font Size : 16px