0% found this document useful (0 votes)
14 views15 pages

Se Lab File

The document outlines the steps for designing requirement analysis and developing a Software Requirement Specification (SRS) according to IEEE standards. It discusses creating use case, activity, state, class, sequence, and object diagrams to model the system. It also provides examples of unit and integration testing a calculator program using JUnit.

Uploaded by

sy19072003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views15 pages

Se Lab File

The document outlines the steps for designing requirement analysis and developing a Software Requirement Specification (SRS) according to IEEE standards. It discusses creating use case, activity, state, class, sequence, and object diagrams to model the system. It also provides examples of unit and integration testing a calculator program using JUnit.

Uploaded by

sy19072003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

1.

Design requirement analysis and develop Software Requirement


Specification Sheet (SRS) for suggested system in IEEE standard
Creating a Software Requirement Specification (SRS) according to IEEE standards is a comprehensive process
that involves defining the system's functional and non-functional requirements. Below, I'll outline the steps for
designing requirement analysis and developing an SRS following IEEE 830-1998, which is a commonly used
standard for SRS documents. Please note that IEEE standards may have been updated since my last knowledge
update in September 2021, so it's essential to verify and adapt to the latest standards if needed.

1. Introduction
Purpose: Explain the purpose of the SRS document.
Scope: Define the scope of the software system.
Definitions, Acronyms, and Abbreviations: List and explain any technical terms used in the document.
2. Overall Description
Product Perspective: Describe how the software system fits into the larger context.
Product Functions: Provide an overview of the system's functions.
User Classes and Characteristics: Define the users and their characteristics.
Operating Environment: Describe the hardware and software requirements.
Design and Implementation Constraints: Identify constraints, such as technology or regulations.
Assumptions and Dependencies: Document any assumptions made during the design process.
3. Specific Requirements
External Interfaces
User Interfaces: Describe the user interfaces.
Hardware Interfaces: Specify hardware requirements.
Software Interfaces: List external software systems the software will interact with.
Communication Interfaces: Define data communication protocols.
Functional Requirements
Provide a detailed description of each functional requirement, including input, processing, and output.
Performance Requirements
Describe performance metrics like response time, throughput, and resource usage.
Design Constraints
Document any design constraints, like specific programming languages, tools, or platforms.
Quality Attributes
Describe non-functional requirements, such as reliability, availability, security, and scalability.
Documentation Requirements
Specify the documentation that should be provided with the software.
Security Requirements
Describe any security measures, access controls, and data protection requirements.
Legal and Compliance Requirements
Mention any legal or regulatory requirements the software must adhere to.
Change Management and Version Control
Explain how changes to the software will be managed and version controlled.
Maintenance and Support
Outline plans for software maintenance and support.
4. System Models (if applicable)
Provide system diagrams, data flow diagrams, or other models that help illustrate the system's architecture.
5. Appendices (if necessary)
Include additional information, such as user manuals, data dictionaries, or test cases.
6. Index (if necessary)
The IEEE SRS should be well-organized, unambiguous, and easy to understand. It should serve as a
comprehensive reference for the software development team, testers, and stakeholders. Additionally, it should
undergo reviews and revisions to ensure accuracy and completeness.
Please note that the above is a general framework for creating an SRS following IEEE standards. The specific
details will depend on the project and the software being developed. It's important to tailor the SRS to your
project's unique needs and requirements and involve stakeholders for their input and validation.
2. Draw the user‘s view analysis for the suggested system: Use case diagram, Activity
Diagram and State chart Diagram.

Use Case Diagram:

A use case diagram illustrates the system's functionality from the user's perspective. It shows the interactions
between actors (users or external systems) and use cases (specific functionalities or features).
Actors: These represent the external entities interacting with the system. Actors can be people, other systems, or
even time-triggered events.
Use Cases: These are specific functionalities or features that the system offers to its users. Each use case
represents a specific interaction or task that a user can perform.
Activity Diagram:

An activity diagram illustrates the workflow or process flow of a specific use case or scenario. It can help you
detail how a particular use case is carried out.
Actions: These represent specific steps or actions within the workflow.
Control Flow: Arrows show the sequence of actions, indicating the order in which they occur.
Decision Nodes: These represent decision points where the workflow can take different paths based on
conditions.
Fork and Join Nodes: These indicate parallel processing and synchronization of flows.
State Chart Diagram:

A state chart diagram shows the different states that an object or system can be in and the transitions between
these states. It's often used to model the behavior of an entity over time.
States: These represent conditions or phases that an object can be in.
Transitions: Arrows show the triggers and conditions that cause an object to move from one state to another.
Events: Events are triggers or stimuli that initiate state transitions.
Actions: Actions represent the activities or operations that occur when a state transition happens.
3. Draw the structural view diagram for the system: Class diagram, object diagram and
Sequence diagram.

Class Diagram:

A class diagram is used to represent the static structure of a system, showcasing the classes, their attributes,
methods, and their relationships.
Classes: Rectangles represent classes. Each class includes the class name, attributes, and methods.
Attributes: These are represented as name: type pairs within the class rectangle.
Methods: These are listed beneath the class name within the class rectangle.
Associations: Lines connecting classes represent associations or relationships between classes. You can label
associations to indicate their nature (e.g., one-to-many).
Inheritance: An open arrowhead line indicates inheritance or a parent-child relationship between classes.
Sequence Diagram:

A sequence diagram illustrates the interactions and messages exchanged between objects or components in a
particular scenario or use case.
Lifelines: Vertical lines represent the lifelines of objects or actors involved in the scenario.
Messages: Horizontal arrows show the flow of messages between objects. Labels on the arrows describe the
type of message or method call.
Activation Bars: Activation bars show the period during which an object is active and processing a message.
Return Messages: Dashed arrows represent return messages when an object responds to a message.

Object Diagram:

An object diagram represents a specific snapshot of a system at a particular point in time, showing instances of
classes and their relationships.
Objects: These are represented by rectangles with the object's name and its class name inside.
Links: Lines connecting objects show relationships between objects. Label these lines to describe the nature of
the relationship.
Attributes and Values: You can show the values of the object's attributes within the object rectangle.
4. Perform Unit testing of calculator program using Junit testing framework.
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class CalculatorTest {

@Test
public void testAddition() {
Calculator calculator = new Calculator();
assertEquals(5, calculator.add(2, 3));
}

@Test
public void testSubtraction() {
Calculator calculator = new Calculator();
assertEquals(2, calculator.subtract(5, 3));
}

@Test
public void testMultiplication() {
Calculator calculator = new Calculator();
assertEquals(15, calculator.multiply(5, 3));
}

@Test
public void testDivision() {
Calculator calculator = new Calculator();
assertEquals(2, calculator.divide(10, 5));
}
}
5. Perform Integration testing of calculator program using Junit testing framework

You have a Calculator class that provides methods for performing arithmetic operations:
public class Calculator {
public int add(int a, int b) {
return a + b;
}
public int subtract(int a, int b) {
return a - b;
}
public int multiply(int a, int b) {
return a * b;
}
public int divide(int a, int b) {
if (b == 0) {
throw new ArithmeticException("Division by zero");
}
return a / b;
}
}

Now, let's create an integration test for the Calculator class to verify that the operations work correctly when
combined:

import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class CalculatorIntegrationTest {
@Test
public void testAdditionAndSubtraction() {
Calculator calculator = new Calculator();
int result = calculator.subtract(calculator.add(5, 3), 2);
assertEquals(6, result);
}
@Test
public void testMultiplicationAndDivision() {
Calculator calculator = new Calculator();
int result = calculator.divide(calculator.multiply(4, 6), 2);
assertEquals(12, result);
}
}
6. Design Test Case for Inventory Management System based on System Specification.

Designing test cases for an Inventory Management System (IMS) based on system specifications involves
creating scenarios and inputs to validate that the system functions correctly. Below, I'll provide a sample set of
test cases that cover various aspects of an IMS. Please note that this is a simplified example, and in a real-world
scenario, you would need to create more extensive test cases.
1. Test Case: Adding a New Item
Input:
Item Name: "Widget A"
Item Category: "Electronics"
Item Quantity: 100
Item Price: $10.99
Expected Output:
Item "Widget A" is added to the inventory with the correct details.
The total number of items in the inventory is updated to 101.

2. Test Case: Updating Item Information


Input:
Select item "Widget A"
Update Item Name to "Super Widget"
Update Item Category to "Gadgets"
Update Item Price to $12.99
Expected Output:
Item information is updated correctly.
Item "Widget A" is now "Super Widget" in the "Gadgets" category with a price of $12.99.

3. Test Case: Deleting an Item


Input:
Select item "Super Widget"
Delete item
Expected Output:
Item "Super Widget" is removed from the inventory.
The total number of items in the inventory is reduced by 1.

4. Test Case: Stock Replenishment


Input:
Select item "Super Widget"
Add 50 units to the existing stock
Expected Output:
The stock quantity for "Super Widget" is updated to 150.
The total number of items in the inventory is adjusted accordingly.

5. Test Case: Selling an Item


Input:
Select item "Super Widget"
Sell 10 units
Expected Output:
The stock quantity for "Super Widget" is reduced to 140.
The system records the sale and updates revenue and sales history.

6. Test Case: Generating Reports


Input:
Generate a sales report for the last month
Expected Output:
The system generates a report with accurate sales data for the specified period.

7. Test Case: User Permissions


Input:
Log in as a regular employee and try to delete an item
Expected Output:
The regular employee should receive a permission error when attempting to delete an item.

8. Test Case: Searching for Items


Input:
Search for items containing the keyword "Widget"
Expected Output:
The system returns a list of items with names or descriptions containing "Widget."
9. Test Case: Handling Invalid Input
Input:
Attempt to add an item with a negative price
Expected Output:
The system should display an error message indicating that the price is invalid.

10. Test Case: Performance and Scalability


Input:
Add a large number of items to the inventory (e.g., 10,000 items).
Expected Output:
The system should handle this load without significant performance degradation.
7. Design Test cases and perform manual testing of login module of FlipKart (as an
example).
Test Cases for Flipkart Login Module:

Valid Login Credentials:


Input: Valid username and password.
Expected Output: Successful login; user is directed to their account page.

Invalid Username:
Input: Invalid/Non-existent username and a valid password.
Expected Output: An error message indicating that the username is incorrect.

Invalid Password:
Input: Valid username and an incorrect password.
Expected Output: An error message indicating that the password is incorrect.

Blank Username:
Input: Leaving the username field blank and providing a valid password.
Expected Output: An error message indicating that the username is required.

Blank Password:
Input: Providing a valid username and leaving the password field blank.
Expected Output: An error message indicating that the password is required.

Password Case Sensitivity:


Input: Valid username and password with incorrect case (e.g., "Password" instead of "password").
Expected Output: An error message indicating that the password is case-sensitive and incorrect.

Forgot Password Link:


Input: Clicking on the "Forgot Password" link.
Expected Output: The user is directed to a password recovery/reset page.

Remember Me Option:
Input: Checking the "Remember Me" checkbox during login.
Expected Output: The user's login session persists even after closing and reopening the browser.

Account Lockout After Multiple Failed Attempts:


Input: Providing incorrect login details multiple times (e.g., three times).
Expected Output: The account is locked, and the user is informed to reset their password or contact customer
support.

Login with Social Media Account:


Input: Logging in using a social media account (e.g., Google or Facebook).
Expected Output: Successful login and association of the social media account with the Flipkart account.

You might also like