GitHub Markdown and How to Write a Great README (with Template)

Your README is the front page of your project, and Markdown is the language of GitHub. In this lesson you will learn Markdown from scratch, the GitHub-specific extras, and how to write a professional README using a ready-made template for test automation projects.

Advertisement

๐Ÿ“– What You’ll Learn: Markdown basics, code blocks and tables, GitHub extras like mentions, alerts, collapsible sections and diagrams, what a great README contains, a README template for a Playwright project, CI badges, your profile README, and other Markdown files.


๐Ÿ“ Why Markdown and README Matter

Markdown is a simple text format that GitHub turns into nicely formatted pages. You use it everywhere on GitHub: README files, issues, pull request descriptions, comments, wikis and release notes.

The README.md file in the root of a repository is shown on the repository’s front page. It is the first thing visitors, teammates and recruiters read. A clear README makes a project easy to use and makes your work look professional.


โœ๏ธ Markdown Basics

You writeYou get
# Heading 1 to ###### Heading 6Headings
**bold** and *italic*bold and italic
~~strikethrough~~Strikethrough
inline code wrapped in single backticksInline code
[link text](https://sqatools.in)A link
![alt text](images/report.png)An image
- item or 1. itemBullet or numbered lists
- [ ] task and - [x] doneTask list checkboxes
> quoteBlock quote
--- on its own lineHorizontal rule

Code blocks

Wrap code in a fence of three backticks (or three tildes) and add the language for syntax highlighting:

~~~bash
npm install
npx playwright test
~~~

Tables

| Command          | What it does         |
|------------------|----------------------|
| npm test         | Run all tests        |
| npm run report   | Open the HTML report |

GitHub extras

FeatureSyntax
Mention a user@username
Link an issue or PR#42
Emoji:rocket: :white_check_mark:
Collapsible section<details><summary>Logs</summary> ... </details>
Alert boxes> [!NOTE], > [!TIP], > [!WARNING] on the first line of a quote
DiagramsA code block with the language mermaid renders flowcharts and sequence diagrams

Preview Markdown on GitHub with the Preview tab, or in VS Code with Ctrl + Shift + V.


๐Ÿ“„ What a Great README Contains

SectionAnswers
Title and one-line descriptionWhat is this?
BadgesIs CI green? Which version or licence?
Features or scopeWhat does it cover?
Tech stackWhich tools and versions?
PrerequisitesWhat do I need installed?
InstallationHow do I set it up?
UsageHow do I run it?
Project structureWhere is everything?
ConfigurationWhich environment variables or settings exist?
Reports and CIWhere are results? How does CI run?
ContributingHow can others help?
Licence and contactCan I reuse it? Who maintains it?

๐Ÿงช README Template for a Test Automation Project

# Swag Labs Playwright Framework

![Playwright Tests](https://github.com/your-username/swaglabs-playwright/actions/workflows/playwright.yml/badge.svg)

End-to-end and API tests for Swag Labs, built with Playwright and TypeScript.

## Features
- Page Object Model with custom fixtures
- Login once with storageState
- Data-driven tests from JSON
- Chromium, Firefox and mobile projects
- HTML report and traces on retry
- GitHub Actions CI with sharding

## Tech stack
Playwright 1.x, TypeScript, Node.js LTS, GitHub Actions

## Getting started
~~~bash
git clone https://github.com/your-username/swaglabs-playwright.git
cd swaglabs-playwright
npm ci
npx playwright install --with-deps
cp .env.example .env
~~~

## Running tests
| Command                | Description              |
|------------------------|--------------------------|
| npm test               | Run all tests            |
| npm run test:smoke     | Run @smoke tests         |
| npx playwright test --ui | Open UI mode           |
| npm run report         | Open the HTML report     |

## Project structure
~~~text
src/pages      Page objects
src/fixtures   Custom fixtures
src/data       Test data
tests/         Test specs
~~~

## Contributing
Create a branch, follow Conventional Commits and open a pull request.

## License
MIT

The CI badge URL follows the pattern https://github.com/OWNER/REPO/actions/workflows/WORKFLOW_FILE/badge.svg. Learn to build that workflow in Playwright in GitHub Actions and use this template for the framework project.

๐Ÿ’ก Tip: Add a short animated GIF or a screenshot of the HTML report: one picture explains a test framework faster than a page of text.


๐Ÿ‘ค Your GitHub Profile README

Create a public repository with exactly the same name as your username (for example asha-verma-qa/asha-verma-qa) and add a README. GitHub shows it at the top of your profile. Include who you are, the tools you use, links to your best projects, and how to contact you.


๐Ÿ“š Other Markdown Files in a Repository

FilePurpose
CONTRIBUTING.mdHow to contribute (open source contributions)
CHANGELOG.mdNotable changes per version (tags and releases)
CODE_OF_CONDUCT.mdCommunity rules
SECURITY.mdHow to report vulnerabilities
docs/*.mdLonger documentation

๐Ÿ“ Assignment

  1. Write a README for your git-practice repository using at least: headings, a list, a table, a code block, a link and a task list.
  2. Add a “Getting started” section with commands and a “Project structure” section.
  3. Add a collapsible <details> section and a > [!TIP] alert, and check the preview on GitHub.
  4. Create your GitHub profile README.
  5. Bonus: after you add a GitHub Actions workflow, add its status badge to your README.

โ“ FAQ

๐Ÿค” What is a README file on GitHub?

A Markdown file (README.md) in a repository’s root that GitHub displays on the repository’s main page to explain what the project is and how to use it.

๐Ÿค” How do I write a good README?

Explain what the project does, how to install and run it, show the structure and configuration, add badges and screenshots, and explain how to contribute.

๐Ÿค” How do I add a code block in Markdown?

Surround the code with three backticks (or three tildes) on separate lines, adding the language after the opening fence for highlighting.

๐Ÿค” How do I create a GitHub profile README?

Create a public repository with the same name as your username and add a README.md file to it.

๐Ÿค” How do I add a CI badge to a README?

Use ![name](https://github.com/OWNER/REPO/actions/workflows/FILE.yml/badge.svg), or copy it from the workflow’s “Create status badge” menu on the Actions tab.


๐ŸŽฏ Next Steps

๐ŸŽฌ Learn Git and GitHub step by step: watch the series on YouTube!

Subscribe to SqaToolsByDY • Practice on sqatools.in

Leave a Comment