Testing | laravel-sitemap-rust | Spatie       

 SPATIE  

laravel-sitemap-rust
====================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-sitemap-rust](https://spatie.be/docs/laravel-sitemap-rust/v1)  Testing

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-sitemap-rust/v1) 

  Testing    
- [ Introduction ](https://spatie.be/docs/laravel-sitemap-rust/v1/introduction)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-sitemap-rust/v1/installation-setup)
- [ Support us ](https://spatie.be/docs/laravel-sitemap-rust/v1/support-us)
- [ Changelog ](https://spatie.be/docs/laravel-sitemap-rust/v1/changelog)
- [ Questions and issues ](https://spatie.be/docs/laravel-sitemap-rust/v1/questions-issues)
- [ Testing ](https://spatie.be/docs/laravel-sitemap-rust/v1/testing)
- [ About us ](https://spatie.be/docs/laravel-sitemap-rust/v1/about-us)

Creating sitemaps
-----------------

- [ Generating a sitemap ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/generating-a-sitemap)
- [ Manually creating a sitemap ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/manually-creating-a-sitemap)
- [ Creating a sitemap index ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/creating-a-sitemap-index)
- [ Splitting large sitemaps ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/splitting-large-sitemaps)
- [ Grouping URLs into multiple sitemaps ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/grouping-urls-into-multiple-sitemaps)
- [ Adding an XSL stylesheet ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/adding-an-xsl-stylesheet)
- [ Returning a response ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/returning-a-response)
- [ Sorting URLs ](https://spatie.be/docs/laravel-sitemap-rust/v1/creating-sitemaps/sorting-urls)

Customizing the crawler
-----------------------

- [ Crawl profiles ](https://spatie.be/docs/laravel-sitemap-rust/v1/customizing-the-crawler/crawl-profiles)
- [ Filtering URLs ](https://spatie.be/docs/laravel-sitemap-rust/v1/customizing-the-crawler/filtering-urls)
- [ Configuring the crawler ](https://spatie.be/docs/laravel-sitemap-rust/v1/customizing-the-crawler/configuring-the-crawler)

Adding content to URLs
----------------------

- [ Alternates ](https://spatie.be/docs/laravel-sitemap-rust/v1/adding-content-to-urls/alternates)
- [ Images ](https://spatie.be/docs/laravel-sitemap-rust/v1/adding-content-to-urls/images)
- [ Videos ](https://spatie.be/docs/laravel-sitemap-rust/v1/adding-content-to-urls/videos)
- [ News ](https://spatie.be/docs/laravel-sitemap-rust/v1/adding-content-to-urls/news)
- [ Sitemapable models ](https://spatie.be/docs/laravel-sitemap-rust/v1/adding-content-to-urls/sitemapable-models)

Advanced usage
--------------

- [ Scheduled generation ](https://spatie.be/docs/laravel-sitemap-rust/v1/advanced-usage/scheduled-generation)
- [ Writing to disks ](https://spatie.be/docs/laravel-sitemap-rust/v1/advanced-usage/writing-to-disks)
- [ Handling errors ](https://spatie.be/docs/laravel-sitemap-rust/v1/advanced-usage/handling-errors)

 Testing
=======

Run these checks from the package directory:

```
cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-targets --all-features
cargo test --locked --workspace --doc --all-features
cargo doc --locked --workspace --no-deps --all-features
```

Set `RUSTDOCFLAGS` to `-D warnings` when running the documentation commands. In POSIX shells, prefix each command with `RUSTDOCFLAGS='-D warnings'`. In PowerShell, first run `$env:RUSTDOCFLAGS = '-D warnings'`.

- Run `./scripts/check` for the package checks with Rust and rustdoc warnings denied.
- Clippy checks error documentation, consuming builder results, redundant clones, and needless collections in addition to its default lints.
- Every guide under `docs/` is discovered recursively for doctests. New guide pages need no manual registration.
- Integration tests use `#[laravel::test]`, `storage::fake`, real routes and disks, SQLite models, and live HTTP crawling.
- Provider tests cover environment validation, application overrides, fresh service bindings, and boot validation.

The package has no models, queued jobs or events of its own. Model tests implement `Sitemapable` on an application model; custom crawling behavior uses native container bindings rather than a separate registration system.

Check the minimum supported Rust version:

```
rustup toolchain install 1.99.0 --profile minimal
cargo +1.99.0 test --locked --workspace --all-targets --all-features
cargo +1.99.0 test --locked --workspace --doc --all-features
```

Check security advisories:

```
cargo install cargo-audit --locked
cargo audit
```

An audit requires access to the RustSec advisory database. No sibling checkout or external database server is needed for tests.

The Chromium integration test is opt-in. On an isolated trusted network, set `SITEMAP_CHROME` to an installed browser executable and run `cargo test --locked --test http native_javascript -- --ignored`. S3 writes require the application's configured cloud account and are not exercised by the default suite.

CI runs stable checks on Linux, macOS and Windows, and separate MSRV and audit jobs on Linux. The package has `publish = false`; no packaging or release step runs. GitHub authentication is optional because its Git dependencies are public.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
