how I can achieve this?
I'm not sure what you mean. You're in control of what URLs you provide to Lighthouse CI so if you need to add something to the query string you can...
but the something is dynamic.
I want to get the auth info from the backend API and append it to the query string.
I guess I can get the auth info via puppeteer script, but I don't know what should I do next.
We determine the URLs dynamically in the use of LHCI on our own project :) Basically you want to run a script before lhci that determines your URLs.
Example:
Thanks, that's helpful.
yarn start collect "--url=$url" --additive || exit 1
ex url)
http://test.com/some-page?name=${name}&age=${age}
When collecting dynamically in the above code, if you use a complex query string, it is not recognized as one page and cannot be compared. Therefore, creating an url without a query string in a test environment and using that url can be an alternative. But it would be nice to have a better way.
@otwm there's an FAQ for that situation ;)