Bitcoin Forum
July 27, 2017, 02:54:05 PM *
News: BIP91 seems stable: there's probably only slightly increased risk of confirmations disappearing. You should still prepare for Aug 1.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Unit Tests  (Read 1131 times)
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
January 02, 2012, 02:36:46 AM
 #1

As the scope of unit tests from
https://bitcointalk.org/index.php?topic=56095.0
was broadened, I created a new topic for various Bitcoin-related Unit Tests.

Here is the repository:
https://github.com/ThePiachu/Bitcoin-Unit-Tests

For now there are a few tests for ECDSA key pair generation, Address generation, and some Script tests to run, along with description of the files. Everything is in plain text for easy use and reading. All in all, something anyone wanting to develop their own Bitcoin code could use.

I intend on developing more tests soon, and hopefully testing those tests against other major Bitcoin applications. If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
1501167245
Hero Member
*
Offline Offline

Posts: 1501167245

View Profile Personal Message (Offline)

Ignore
1501167245
Reply with quote  #2

1501167245
Report to moderator
1501167245
Hero Member
*
Offline Offline

Posts: 1501167245

View Profile Personal Message (Offline)

Ignore
1501167245
Reply with quote  #2

1501167245
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1501167245
Hero Member
*
Offline Offline

Posts: 1501167245

View Profile Personal Message (Offline)

Ignore
1501167245
Reply with quote  #2

1501167245
Report to moderator
No_2
Hero Member
*****
Offline Offline

Activity: 776


BTC: the beginning of stake-based public resources


View Profile WWW
March 12, 2013, 03:04:17 AM
 #2

With regards to the mining clients were most of the unit tests implemented after the initial development? What is the percentage of coverage of unit-testable code?

MetaLair: a blockchain and cryptocurrency consultancy
Twitter: @MetaLair | Facebook | Google+
grau
Hero Member
*****
Offline Offline

Activity: 836


bits of proof


View Profile WWW
March 12, 2013, 01:14:42 PM
 #3

If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

Great work, thanks.
Would you mind using JSON format as do the unit tests for the Satoshi, BitcoinJ and bitsofproof implementations?
behindtext
Full Member
***
Offline Offline

Activity: 121


View Profile WWW
March 12, 2013, 04:18:30 PM
 #4

As the scope of unit tests from
https://bitcointalk.org/index.php?topic=56095.0
was broadened, I created a new topic for various Bitcoin-related Unit Tests.

Here is the repository:
https://github.com/ThePiachu/Bitcoin-Unit-Tests

For now there are a few tests for ECDSA key pair generation, Address generation, and some Script tests to run, along with description of the files. Everything is in plain text for easy use and reading. All in all, something anyone wanting to develop their own Bitcoin code could use.

I intend on developing more tests soon, and hopefully testing those tests against other major Bitcoin applications. If you are a developer and you ran those tests, please let me know of the results - successfully running the test means my code runs well, failed tests may indicate my code is at fault Wink.

glad to see someone talking about being proactive instead of reactive! Smiley

it is often ideal to have unit tests integrated into the main codebase so they can run when builds occur, but not all languages make this easy. i've gotten a lot of mileage out of using a post-commit hook with an automated build system, e.g. jenkins, for testing.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!