Skip to content

Session Sharing - Collaborate on Solana Testing with Your Team

Session Sharing allows you to share your entire testing environment with team members, stakeholders, or collaborators via a simple URL - no technical setup required on their end. Everything is encoded and compressed into the URL using LZ-compression for efficient sharing.

Session Sharing creates a compressed URL that contains:

  • Complete IDL - Your program’s interface definition
  • All Instructions - With configured accounts and arguments
  • Form Data - All argument values you’ve entered
  • Account Addresses - Every account address you’ve used
  • Cluster Config - The network (devnet/mainnet/local) you’re using
  • Active Instruction - Which instruction was selected

Anyone with the link can interact with your testing environment without:

  • ❌ Installing Testship
  • ❌ Setting up Solana CLI
  • ❌ Building the program
  • ❌ Configuring dev tools
  • ❌ Having the IDL file

Just click the link and test! 🚀

Show your program in action:

  • Share a link with investors or clients
  • Let them interact with the program safely
  • No technical knowledge required
  • Real-time updates as they test

Work together on testing:

  • Share test scenarios with developers
  • Let designers see the program in action
  • Enable QA team to test thoroughly
  • Product managers can validate features

Make debugging easier:

  • Share exact state when bug occurred
  • Include transaction history leading to the issue
  • Let others reproduce the problem
  • Faster issue resolution

Teach others about your program:

  • Create interactive tutorials
  • Share with developers learning your codebase
  • Onboard new team members
  • Build community around your project

Step-by-Step:

  1. Fill out your form - Configure all accounts and arguments
  2. Click the “Share” button in the top-right of the instruction form
  3. Choose base URL:
    • https://app.testship.xyz (recommended - hosted version)
    • http://localhost:3000 (if running Testship locally)
    • Custom URL (for self-hosted instances)
  4. Copy the generated link - Appears at the bottom
  5. Share it - Send via Slack, email, etc.

What gets generated:

https://app.testship.xyz/s#state=N4IgdghgtgpiBcIA...
Compressed state (~2-10KB typically)

Recipients simply:

  1. Click the link - Opens in browser
  2. UI loads instantly - With all your configuration
  3. Connect wallet - To execute transactions
  4. Test immediately - Everything pre-configured!

No backend database - everything is in the URL! 🎉

Testship uses lz-string compression:

  • Before compression: ~50KB JSON
  • After compression: ~5-15KB base64 URL
  • Encoding: compressToEncodedURIComponent()
  • Decoding: decompressFromEncodedURIComponent()

This keeps URLs shareable (most platforms support ~100KB URLs).

The shared state contains:

interface AppState {
idl: Idl; // Complete Anchor IDL
instructions: {
// Per-instruction state
[instructionName: string]: {
formData: Record<string, string | number>;
accountsAddresses: Map<string, string | null>;
// Note: signersKeypairs NOT included (security)
};
};
activeInstruction: string | null; // Currently selected
cluster?: SolanaCluster; // Network config
}
// 1. Serialize state to JSON
const stateJSON = JSON.stringify(appState);
// 2. Compress using LZ
const compressed = LZ.compressToEncodedURIComponent(stateJSON);
// 3. Build URL
const shareURL = `${baseURL}/s#state=${compressed}`;
// 1. Extract from URL hash
const hash = window.location.hash; // #state=...
const match = hash.match(/state=([^&]+)/);
// 2. Decompress
const decompressed = LZ.decompressFromEncodedURIComponent(match[1]);
// 3. Parse JSON
const appState = JSON.parse(decompressed);
// 4. Restore React state
setIdl(appState.idl);
setInstructions(appState.instructions);
setActiveInstruction(appState.activeInstruction);
  • IDL - Public interface definition (already on-chain with your program)
  • Account addresses - Public keys (visible on Solana Explorer anyway)
  • Form data - Argument values you entered
  • Cluster config - Just the network name (devnet/mainnet/etc.)

All of this is public information - nothing sensitive!

  • Private keys - NEVER included in URLs
  • Keypairs - Only generated locally
  • Wallet seed phrases - Stay in your wallet
  • Transaction history - Not included in share links
  • Saved accounts - Local to your browser
  • Client-side only - No data sent to external servers
  • HTTPS recommended - Use app.testship.xyz not HTTP
  • URL visibility - Don’t share links containing sensitive test data publicly
  • Temporary nature - Links work as long as the URL is valid
  • No expiration - Links don’t expire (unless you want that feature!)
  • Test the link first - Click it yourself before sharing
  • Use app.testship.xyz - Hosted version for easy sharing
  • Clear instructions - Tell recipients what to expect
  • Check URL length - Most platforms support ~100KB URLs
  • Use for demos - Perfect for showing off your program
  • Don’t share sensitive test data - URLs are visible to anyone
  • Don’t include production keys - Only use devnet/testnet
  • Don’t exceed URL limits - Very large IDLs might be too big
  • Don’t rely on it for long-term storage - It’s for sharing, not archiving
"Hey team, found a bug in the transfer instruction.
Here's a link with the exact state that causes it:
https://app.testship.xyz/s#state=N4Igdghgtgpi..."
Recipient clicks → Sees exact configuration → Reproduces bug → Fixed!
"Check out our new staking feature!
Click this link to try it (devnet):
https://app.testship.xyz/s#state=N4Igdghgtgpi..."
Client clicks → Tests immediately → Gives feedback → You iterate
"New to the team? Here's our program running:
https://app.testship.xyz/s#state=N4Igdghgtgpi...
No setup needed - just connect your wallet!"
New dev clicks → Understands program → Productive Day 1

Current limitations (to be improved):

  • URL length - Very large IDLs (>50KB) might exceed URL limits
  • No expiration - Links don’t auto-expire (good or bad depending on use case)
  • No analytics - Can’t see who clicked your link
  • No password protection - Links are public
  • No versioning - Can’t track changes to shared sessions

For most use cases, these limitations are fine!

1. URL too long

Some platforms (older email clients) have URL limits.
Solution: Share via Slack, Discord, or modern platforms.

2. State fails to decode

Check browser console for errors.
Solution: Generate a new link.

3. IDL not loading

Recipient might have network issues.
Solution: Have them refresh the page.

Learn about Account Suggestions and how Test ship makes testing even faster.