Overview
Script to Test Generation bridges the gap between traditional automation frameworks and Spur’s natural language testing approach. By importing scripts, you can quickly migrate existing test coverage to Spur without manual rewriting, while maintaining the test logic and validation steps you’ve already developed. Supported Script Types:- Playwright scripts (.js, .ts)
- Selenium scripts (.js)
- Cypress scripts (.js)
- Puppeteer scripts (.js)
.js and .ts files only.
How to generate Spur tests from scripts
1
Navigate to dashboard and create a new test
Open your Spur Dashboard. Click Create and select Test from the dropdown menu.

2
Name your test and select Test Suite
Enter a name for your test and add it to an existing Test Suite or create a new one. Click Create Test to proceed.

3
Configure test URL
The test side peek opens with the Test URL field pre-filled. Reference Environments for configuring environment-specific URLs.

4
Navigate to auto-generate and click from code
Locate the Auto-generate button in the Test Steps section and click From Code to access the script import feature.

5
Import your script
The Import Test Steps from Test Script modal opens. Select your script file and click Import Steps.

6
Configure and save
All imported test steps now appear in the test side peek. Configure viewport settings, Advanced Configurations, and caching options as needed. Reference Create Your First Test for detailed guidance on these settings.Click Save Test when complete.

7
View your created test
Your test is ready. Navigate to the test suite where you saved your test to view, run, or edit it.

Best practices
- Review all imported steps: Always verify that converted steps match your testing intent. Review the converted steps before running.
- Use the Preview Editor: After import, use the Preview Editor to validate and refine test steps with live browser feedback.
- Maintain test organization: Import scripts into appropriate test suites to maintain clear test organization and facilitate team collaboration.
