Test Fixtures Management

2 views
Skip to first unread message

Sidney Zhang

unread,
Feb 15, 2014, 2:39:49 AM2/15/14
to Bitcoin...@googlegroups.com
https://github.com/cryptocoinjs/btc-transaction/blob/master/test/transaction.test.js#L14

The above are some of the examples of fixtures that we need across all of the modules' tests. 

I feel like it would be good to have a central place to combine these fixtures and reuse them.

I want to get your thoughts on these

JP Richardson

unread,
Feb 15, 2014, 10:37:35 AM2/15/14
to Bitcoin...@googlegroups.com
Good thought. How about the Wiki in the cryptocoin Github repo? We could start a new document called `Test fixtures` or something like that. 


--
You received this message because you are subscribed to the Google Groups "Bitcoin Hackers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to BitcoinHacker...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Follow me on Twitter: http://twitter.com/jprichardson

Sidney Zhang

unread,
Feb 15, 2014, 12:17:03 PM2/15/14
to Bitcoin...@googlegroups.com
I was actually going to suggest that we could have a module called btc-fixtures

In that module, we could keep all kinds of fixtures in there and would probably really help other developers too.

For example: in order to test serialize() or deserialize

We need the hex for

coinbase transaction
pubkeyhash transaction
scripthash transaction
pubkey transaction
op_return transaction
nulldata transaction
escrow transaction

The same applies to script etc. Might be useful as a module or a separate repo

JP Richardson

unread,
Feb 15, 2014, 12:19:54 PM2/15/14
to Bitcoin...@googlegroups.com
I like this idea much better!

Sidney Zhang

unread,
Feb 15, 2014, 12:49:19 PM2/15/14
to JP Richardson, Bitcoin...@googlegroups.com

Also need to test for all the mutated transactions due to the malleability bug

Sidney Zhang

unread,
Feb 20, 2014, 12:26:36 AM2/20/14
to JP Richardson, Bitcoin...@googlegroups.com

Kind regards,


Sidney Zhang

Mobile: +1 415 767 8831 

Reply all
Reply to author
Forward
0 new messages