Skip to content

Conversation

@oleiade
Copy link
Contributor

@oleiade oleiade commented Sep 23, 2025

What?

This pull request adds comprehensive documentation for the new k6/x/dns extension module, which enables DNS resolution testing in k6. The documentation introduces the module, details its API, provides usage examples, explains error handling, and describes the metrics generated. The changes are organized into three new documentation pages: an overview, and detailed pages for the resolve and lookup functions.

New documentation for the DNS extension:

Overview and Introduction

  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/_index.md with an overview of the k6/x/dns module, its key features, use cases, API summary, available metrics, and practical code examples for DNS testing scenarios.

API Reference and Usage Details

  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/resolve.md with detailed documentation for the dns.resolve() function, including parameters, return values, usage examples (A and AAAA record resolution, multiple DNS servers, performance comparison), error handling, metrics, and important notes on usage.
  • Adds docs/sources/k6/next/javascript-api/k6-x-dns/lookup.md with detailed documentation for the dns.lookup() function, including parameters, return values, usage examples (basic lookup, comparison with custom DNS, load testing, configuration validation), error handling, metrics, and usage notes.

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

💻 Deploy preview available (docs: add comprehensive k6/x/dns extension documentation):

- Add complete documentation for k6/x/dns module with _index.md overview
- Create resolve.md documenting dns.resolve() function with parameters, examples, and error handling
- Create lookup.md documenting dns.lookup() function for system DNS resolution
- Include installation instructions, API reference, and metrics documentation
- Add comprehensive examples for IPv4/IPv6 resolution, performance testing, and validation
- Use IPv6 DNS server (2606:4700:4700::1111) in IPv6 examples for consistency
- Replace check() usage with k6-jslib-testing expect() assertions throughout examples
- Follow k6 documentation conventions matching existing API documentation structure
@oleiade oleiade self-assigned this Oct 20, 2025
@oleiade oleiade marked this pull request as ready for review October 20, 2025 13:18
@oleiade oleiade requested review from a team and heitortsergent as code owners October 20, 2025 13:18
@oleiade oleiade requested review from ankur22, codebien and joanlopez and removed request for a team and ankur22 October 20, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant