sitemap
Collects all pages visited while tests are running and saves them as a sitemap XML file.
The plugin listens to browser navigation events, so it doesn’t slow down test steps.
Page loads and SPA route changes (history.pushState) of the top-level page are recorded, iframes are ignored.
Every unique http(s) URL is added to the sitemap. URL fragments (#...) are dropped.
Supported helpers: Playwright, Puppeteer, and WebDriver with BiDi protocol enabled (default). The sitemap is written once all tests finish.
Configuration
Section titled “Configuration”"plugins": { "sitemap": { "enabled": true } }Possible config options:
file: path to the sitemap file, relative to the output directory. Default:sitemap.xml, saved asoutput/sitemap.xml.stripQuery: remove query strings so/posts?page=1and/posts?page=2become one/postsentry. Set tofalseto keep them. Default: true.
CLI examples:
npx codeceptjs run -p sitemapnpx codeceptjs run -p sitemap:file=visited.xmlnpx codeceptjs run -p sitemap:stripQuery=falseWorks with run-workers: URLs from all workers are merged into a single sitemap.
Parameters
Section titled “Parameters”configany