How to Extend the Fuzzer
To add more test coverage:
Add new generator functions in
fuzzer.rs
:pub fn generate_conflicting_proposal() -> Proposal { // Compose two mutually exclusive changes }
Add new fuzz test case:
#[test] fn test_fuzz_conflict_detection() { let proposal = generate_conflicting_proposal(); assert_err!( PropertyGovernance::submit_proposal(origin, proposal), Error::<Test>::ConflictingProposal ); }
Automate with looped inputs:
for _ in 0..100 { let proposal = generate_random_proposal(); let _ = PropertyGovernance::submit_proposal(origin.clone(), proposal); }
Last updated