Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooja40jadeja/sitemap-helper
Checks quality of your sitemaps. Also returns non-200 URLs.
https://github.com/pooja40jadeja/sitemap-helper
jest qa-automation seo sitemap sitemap-checker sitemap-tester software-testing typescript
Last synced: 14 days ago
JSON representation
Checks quality of your sitemaps. Also returns non-200 URLs.
- Host: GitHub
- URL: https://github.com/pooja40jadeja/sitemap-helper
- Owner: pooja40jadeja
- License: mit
- Created: 2024-09-04T13:10:07.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T13:22:26.000Z (4 months ago)
- Last Synced: 2024-10-25T02:42:48.716Z (2 months ago)
- Topics: jest, qa-automation, seo, sitemap, sitemap-checker, sitemap-tester, software-testing, typescript
- Language: TypeScript
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sitemap-helper
* Sitemap Helper checks that total number of urls are equal to or more than mininum required threshold.
* Also, it checks that the Response codes other than 200 (404, 301, 302) returned by each URL present within Sitemaps are within given threshold.
* The base URL can be defined as Environment variable or can be hardcoded as per the need.
* This application also supports sitemaps with multiple sitemap files. To do that, just replace `sitemapFiles` in `tests/checkNoOfUrls.ts`
and `sitemapFileName` in `tests/validateSitemapResponseCodes.ts` with path of your sitemap files. Also, update the minimum required threshold per sitemap file in `tests/checkNoOfUrls.ts`.
* Currently, request rate is being controlled by https://www.npmjs.com/package/bottleneck as it allows to control maximum requests within given time in order to avoid sudden traffic on application.
* If your application is able to handle such traffic, then you can remove bottleneck from fetch declaration as it will speed up the test execution.## Prerequisites
* Node - v20+
* npm## Installation
1. Clone the repo
```shell
git clone https://github.com/pooja40jadeja/sitemap-helper.git
```
2. Set the right Node version
```shell
nvm use 20
```
3. Install NPM packages
```shell
npm install
```
## LintingTo run lint: `$ npm run lint`
## Execution
To run tests: `$ npm run test`## Reporting
Upon completion of test execution, an HTML report will be generated under `\out` folder.
For failed test, it will also log the error there.