Skip to main content

Questions tagged [tests]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Tests coverage for Solana programs?

It is important in development of anything (including Solana programs) to be able to track code coverage. Is there a way to get the coverage for BPF/SBF-based tests?
user avatar
1 vote
1 answer

Best practise on writing tests for PDAs with static seeds

I usually write my tests and run them against a local validator using solana-test-validator in a terminal and then is use anchor test --skip-local-validator. Like this I can look at the transactions ...
Jonas H.'s user avatar
  • 5,817
1 vote
0 answers

Anchor tests not passing unless I switch off Internet connection [closed]

Been struggling with this issue for a few days and can't figure it out. I'll be brief. My Anchor tests are not passing, but they are passing for everyone else who's running them. For me, they fail in ...
Guido Dipietro's user avatar
2 votes
2 answers

How to sign with PDAs

I have a this function pub fn sign_up(ctx: Context<SignUp> , user_name: String , phone_number: String , email: String) -> Result<()> {// logic is here} And in SignUp i have : #[derive(...
Reza Aslejeddian's user avatar
4 votes
2 answers

How do I solve this: `Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x0`

I have this in my file: #[derive(Accounts)] pub struct Initialize<'info> { #[account( init, payer = authority, space = 8 + Config::SIZE, seeds = ["config"....
Ademola's user avatar
  • 3,854
0 votes
3 answers

Can I run tests using "solana-program-test" on devnet?

The test here uses "solana-program-test" and async/await. Can I run these test scripts on devnet ...
gbb's user avatar
  • 1