Skip to content

Instantly share code, notes, and snippets.

@purrarri
Last active February 27, 2025 11:54
Show Gist options
  • Select an option

  • Save purrarri/217dbaa5f5fbe21e18959603f057daf8 to your computer and use it in GitHub Desktop.

Select an option

Save purrarri/217dbaa5f5fbe21e18959603f057daf8 to your computer and use it in GitHub Desktop.
Q1. Breakdown test cases as in cucumber/ gherkin formatting as for assesment :

Q1 Background: GIThub is a web-based hosting service for version control using Git. Itis widely used to store code revisions in a single repository. GIThub also provides several other features one of them being, Gists. Gists are mainly used for documentation purposes to share code snippets, notes, files, directories, as well as full applications. Go to https://gist.github.com/ HYPERLINK "https://gist.github.com/", login and clickon New Gist to create a new gist. Gists can have different extensions such as .js, .md, .txt, etc. Create a test scenario which has multiple test cases for the following features: • As a user, I want to create a public gist. • As a user, I want to edit an existing gist. • As a user, I want to delete an existing gist. The test cases should include as much detail as possible.

Test Cases in Gherkin/Cucumber Formats

This document presents a set of test cases written in Gherkin/Cucumber format for testing the features related to public gists on GitHub. Gists are used for sharing code snippets, notes, files, and directories.

The test cases cover the following scenarios:

  1. Create Public Gist

    • This scenario includes test cases for creating a public gist with and without a registered account on GitHub.
  2. Edit an Existing Gist

    • This scenario focuses on test cases for editing an existing gist, including scenarios with both active and inactive accounts.
  3. Delete an Existing Gist

    • This scenario contains test cases for deleting an existing gist, covering different ways of deletion.

The test cases are written using the Gherkin syntax, which provides a clear and structured format for expressing requirements and expectations.

Usage

The test cases can be used for manual testing or as a reference for creating automated test scripts. Each test case includes the following information:

  • Id Test Case: A unique identifier for the test case.
  • Description: A brief description of the test case.
  • Feature: The feature or functionality being tested.
  • Type: Indicates whether the test case is positive or negative.
  • Precondition: Any necessary prerequisites for executing the test case.
  • Test Steps: The step-by-step instructions for executing the test case.
  • Data Input: The input data required for the test case.
  • Expected Result: The expected outcome or behavior.
  • Actual Result: The actual outcome after executing the test case.
  • Test Date: The date when the test was executed.
  • Status: The status of the test case (Passed, Failed, Blocked).
  • Error Category: The severity category of any encountered errors (Low, Medium, High).

Feel free to refer to the test cases in the subsequent sections for detailed steps and expected results.

Feature: Gist Management
Scenario: Create Public Gist without Login/Register Account
Id Test Case: TC-0001
Description: Test case for creating a public gist without logging in/registering an account
Type: Negative
Given I am on the GitHub Gist page
When I click on the '+' icon
And I choose to create a Gist
Then I should be redirected to the GitHub Discover page
Then I should not be able to create a Gist
And the "Create Gist" feature should not be visible
And only the following features should be displayed: "Sign in," "Sign Up," "Search Gist," "Gist Posted"
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Create Public Gist with Active Account on gist.github.com
Id Test Case: TC-0002
Description: Test case for creating a public gist with an active account using gist.github.com
Type: Positive
Precondition: Account must be registered on GitHub
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I click on the '+' icon in the header bar
Then the "Add Gist" feature should be visible
When I provide the following Gist values:
| Description | File Name | Gist Detail |
| Create, edit, delete Gist Test Case | Scenario1tc2.js | Test case for create public gist with active account using gist.github.com and test case |
And I select "create public gist" from the dropdown at the bottom right of the page
And I click the "Create public gist" button
Then I should be redirected to the GitHub Discover page
Then the created Gist should appear on the GitHub Discover page
And the created Gist should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Create Public Gist using github.com
Id Test Case: TC-0003
Description: Test case for creating a public gist using github.com
Type: Positive
Precondition: Account must be registered on GitHub
Given I am on the GitHub homepage
When I click on the "Sign In" button
And I enter my username/email and password
And I click on the '+' icon in the header bar
And I choose "New Gist"
Then the "Add Gist" feature should be visible
When I provide the following Gist values:
| Description | File Name | Gist Detail |
| Create, edit, delete Gist Test Case | Scenario1tc3.js | Test case for create public gist with active account using github.com and test case |
And I select "create public gist" from the dropdown at the bottom right of the page
And I click the "Create public gist" button
Then I should be redirected to the GitHub Discover page
Then the created Gist should appear on the GitHub Discover page
And the created Gist should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Create File on Public Gist Folder using gist.github.com
Id Test Case: TC-0004
Description: Test case for creating a file on a public gist folder using gist.github.com
Type: Positive
Precondition: Account must be registered on GitHub
Given I am on the GitHub homepage
When I click on the "Sign In" button
And I enter my username/email and password
And I navigate to "your profile"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Add File" button at the bottom left of the page
Then the section for filling the Gist values should be automatically populated
And the "Create public gist" button should be active after filling all the fields
When I provide the following Gist values:
| File Name | Gist Detail |
| Scenario1tc4.js | Test case for creating a file on a public gist folder using gist.github.com and test case |
And I select "create public gist" from the dropdown at the bottom right of the page
And I click the "Create public gist" button
Then I should be redirected to the GitHub Discover page
Then the created Gist file should appear on the Gist GitHub Discover page
And the created Gist file should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Create File on Public Gist Folder using github.com
Id Test Case: TC-0005
Description: Test case for creating a file on a public gist folder using github.com
Type: Positive
Precondition: Account must be registered on GitHub
Given I am on the GitHub homepage
When I click on the "Sign In" button
And I enter my username/email and password
And I click on my avatar account in the header bar
And I choose "Your Gist"
When I check the "All Gist" section
And I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Add File" button at the bottom left of the page
Then the section for filling the Gist values should be automatically populated
And the "Create public gist" button should be active after filling all the fields
When I provide the following Gist values:
| File Name | Gist Detail |
| Scenario1tc5.js | Test case for creating a file on a public gist folder using github.com and test case |
And I select "create public gist" from the dropdown at the bottom right of the page
And I click the "Create public gist" button
Then I should be redirected to the GitHub homepage
Then the created Gist file should appear on the Gist GitHub Discover page
And the created Gist file should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Edit an Existing Public Gist using gist.github.com
Id Test Case: TC-0006
Description: Test case for editing an existing public gist using gist.github.com
Type: Positive
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I go to "View your gists"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Edit" button on the top right of the page
Then the section for editing the Gist values should be visible
And I can edit the Gist name or contents
When I update the Gist values with the following:
| File Name | Gist Detail |
| Scenario2tc1.js | Test case for editing an existing public gist using gist.github.com and test case |
And I click the "Update public gist" button
Then I should be redirected to the GitHub Discover page
Then the edited Gist file should appear on the Gist GitHub Discover page
And the edited Gist file should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Edit an Existing Public Gist using github.com
Id Test Case: TC-0007
Description: Test case for editing an existing public gist using github.com
Type: Positive
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub homepage
When I click on the "Sign In" button
And I enter my username/email and password
And I click on my avatar account in the header bar
And I choose "Your Gist"
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Edit" button on the top right of the page
Then the section for editing the Gist values should be visible
And I can edit the Gist name or contents
When I update the Gist values with the following:
| File Name | Gist Detail |
| Scenario2tc1.js | Test case for editing an existing public gist using github.com and test case |
And I click the "Update public gist" button
Then I should be redirected to the GitHub homepage
Then the edited Gist file should appear on the Gist GitHub Discover page
And the edited Gist file should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Cancel Edit of Existing Public Gist using gist.github.com
Id Test Case: TC-0008
Description: Test case for canceling the edit of an existing public gist using gist.github.com
Type: Negative
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I go to "your profile"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Edit" button on the top right of the page
Then the section for editing the Gist values should be visible
And I can edit the Gist name or contents
When I update the Gist values with the following:
| File Name | Gist Detail |
| Scenario2tc1.js | Test case for editing an existing public gist using gist.github.com and test case |
And I click the "Cancel" button
Then I should be redirected to the GitHub Discover page
Then the edited Gist file should not appear on the Gist GitHub Discover page
And the edited Gist file should not be accessible to anyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Delete an Existing Public Gist
Id Test Case: TC-0009
Description: Test case for deleting an existing public gist by clicking the "Delete" button on the top right of the page when opening the public gist folder
Feature: Edit
Type: Positive
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I go to "View your gists"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Delete" button on the top right of the page
And I click the "ok" button on the pop-up confirmation from gist.Github
Then I should be redirected to the GitHub Discover page
Then the deleted Gist should not appear on the Gist GitHub Discover page
And the deleted Gist should not be accessible to anyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Delete an Existing Public Gist File
Id Test Case: TC-0010
Description: Test case for deleting an existing public gist file by clicking the "Delete" button on the file when editing the public gist folder
Feature: Edit
Type: Positive
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I go to "View your gists"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Edit" button on the top right of the page
And I click the "Delete" button next to the file name including the extension
Then I should be redirected to the GitHub Discover page
Then the deleted Gist file should not appear on the Gist GitHub Discover page
And the deleted Gist file should not be accessible to anyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Feature: Gist Management
Scenario: Cancel Delete of Existing Public Gist
Id Test Case: TC-0011
Description: Test case for canceling the delete of an existing public gist by clicking the "Cancel" button on the pop-up asking permission
Feature: Edit
Type: Negative
Precondition:
- Account must be registered on GitHub
- Public Gist was created
Given I am on the GitHub Gist page
When I click on the "Sign In" button
And I enter my username/email and password
And I go to "View your gists"
And I check the "All Gist" section
When I choose the "Create, edit, delete Gist Test Case" folder
And I click the "Delete" button on the top right of the page
And I click the "Cancel" button on the pop-up confirmation from gist.Github
Then I should be redirected to the GitHub Discover page
Then the Gist should still appear on the Gist GitHub Discover page
And the Gist should be accessible to everyone who accesses https://gist.github.com/
Test Date:
Status: [Passed, Failed. Blocked]
Error Category: [Low, Medium, High]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment