question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `BASE_URL` support

See original GitHub issue

When you have multiple environments you might want to run your tests with different base URLs for each environment. For example:

BASE_URL=http://www.staging.your-awesome-application.com npx @puppeteer/replay recording.json
BASE_URL=http://www.test.your-awesome-application.com npx @puppeteer/replay recording.json

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
OrKoNcommented, May 24, 2022

@puskuruk I think it’d be nice to allow importing custom runner extensions so that use case/app-specific logic could be implemented. But I think it’s something that we need to take a look into!

0reactions
puskurukcommented, Aug 1, 2022

Since we have a solution to modify URLs with an extension we can close this issue. 🙏

Example implementation:

const { PuppeteerRunnerExtension } = require('@puppeteer/replay')

class Extension extends PuppeteerRunnerExtension {
  async runStep(step, flow) {
    if ('url' in step) {
      // modify URL here
      // reassign step here
    }

    await super.runStep(step, flow)
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Add baseUrl and paths in tsconfig.json and jsconfig.json #5645
This will help VSCode and other IDE to resolve path in TypeScript & JavaScript.
Read more >
baseUrl - TSConfig Option - TypeScript
TSConfig. baseUrl. Customize. Site Colours: ... Community. Get Help · Blog · GitHub Repo · Community Chat · @TypeScript · Stack Overflow ·...
Read more >
Adding Base URL to REST Service
A base URL path includes the hostname of the server where the REST Service is actually hosted. ... Click the REST Service you...
Read more >
Add absolute paths to app created by "Create React App"
Create a tsconfig.json file and add the code below. ... which supports the same baseUrl and rootPath properties as tsconfig.
Read more >
The Document Base URL element - HTML - MDN Web Docs
The HTML element specifies the base URL to use for all relative URLs in a document. There can be only one element in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found