tools icon indicating copy to clipboard operation
tools copied to clipboard

📎 Generated playground links for tests

Open NicholasLYang opened this issue 3 years ago • 2 comments

Description

Currently when I debug a failing test, I have to copy the code into a playground manually. Instead, we could have the link automatically generated. This could be pretty simple to implement, as stdout is only shown on a test failure, so we could just preemptively print a playground link and it'll show up on a test failure.

Playground links pass the code via a base64 encoded string appended to the url after a #. Therefore we could do something like:

format!("http://localhost:3000/#{}", code)

Note that we produce a localhost link, because play.rome.tools is main by default. We could also print out a command for starting the playground if necessary.

NicholasLYang avatar May 26 '22 00:05 NicholasLYang

@NicholasLYang is the goal to create these links on CI test failures? It will be hard for others to contribute this behaviour because they aren't allowed to run CI jobs.

MichaReiser avatar Jun 06 '22 12:06 MichaReiser

This issue is stale because it has been open 14 days with no activity.

github-actions[bot] avatar Sep 19 '22 12:09 github-actions[bot]