Session Sharing - Collaborate on Solana Testing with Your Team
Overview
Section titled “Overview”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.
What is Session Sharing?
Section titled “What is Session 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! 🚀
Use Cases
Section titled “Use Cases”Demo to Stakeholders
Section titled “Demo to Stakeholders”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
Collaborate with Team Members
Section titled “Collaborate with Team Members”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
Bug Reports
Section titled “Bug Reports”Make debugging easier:
- Share exact state when bug occurred
- Include transaction history leading to the issue
- Let others reproduce the problem
- Faster issue resolution
Educational Purposes
Section titled “Educational Purposes”Teach others about your program:
- Create interactive tutorials
- Share with developers learning your codebase
- Onboard new team members
- Build community around your project
How It Works
Section titled “How It Works”Creating a Shareable Link
Section titled “Creating a Shareable Link”Step-by-Step:
- Fill out your form - Configure all accounts and arguments
- Click the “Share” button in the top-right of the instruction form
- Choose base URL:
https://app.testship.xyz(recommended - hosted version)http://localhost:3000(if running Testship locally)- Custom URL (for self-hosted instances)
- Copy the generated link - Appears at the bottom
- Share it - Send via Slack, email, etc.
What gets generated:
https://app.testship.xyz/s#state=N4IgdghgtgpiBcIA... ↑ Compressed state (~2-10KB typically)Accessing a Shared Link
Section titled “Accessing a Shared Link”Recipients simply:
- Click the link - Opens in browser
- UI loads instantly - With all your configuration
- Connect wallet - To execute transactions
- Test immediately - Everything pre-configured!
No backend database - everything is in the URL! 🎉
URL Compression
Section titled “URL Compression”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).
Technical Implementation
Section titled “Technical Implementation”Data Structure
Section titled “Data Structure”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}Encoding Process
Section titled “Encoding Process”// 1. Serialize state to JSONconst stateJSON = JSON.stringify(appState);
// 2. Compress using LZconst compressed = LZ.compressToEncodedURIComponent(stateJSON);
// 3. Build URLconst shareURL = `${baseURL}/s#state=${compressed}`;Decoding Process
Section titled “Decoding Process”// 1. Extract from URL hashconst hash = window.location.hash; // #state=...const match = hash.match(/state=([^&]+)/);
// 2. Decompressconst decompressed = LZ.decompressFromEncodedURIComponent(match[1]);
// 3. Parse JSONconst appState = JSON.parse(decompressed);
// 4. Restore React statesetIdl(appState.idl);setInstructions(appState.instructions);setActiveInstruction(appState.activeInstruction);Privacy & Security
Section titled “Privacy & Security”✅ What’s Shared (Safe)
Section titled “✅ What’s Shared (Safe)”- 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!
❌ What’s NOT Shared (Protected)
Section titled “❌ What’s NOT Shared (Protected)”- ❌ 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
Security Notes
Section titled “Security Notes”- Client-side only - No data sent to external servers
- HTTPS recommended - Use
app.testship.xyznot 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!)
Best Practices
Section titled “Best Practices”✅ Do This
Section titled “✅ Do This”- 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
❌ Avoid This
Section titled “❌ Avoid This”- 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
Real-World Examples
Section titled “Real-World Examples”Example 1: Bug Report
Section titled “Example 1: Bug Report”"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!Example 2: Client Demo
Section titled “Example 2: Client Demo”"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 iterateExample 3: Onboarding
Section titled “Example 3: Onboarding”"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 1Limitations
Section titled “Limitations”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!
Troubleshooting
Section titled “Troubleshooting”Link Not Working?
Section titled “Link Not Working?”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.Next Steps
Section titled “Next Steps”Learn about Account Suggestions and how Test ship makes testing even faster.