Nunit and JUnit

Source: Internet
Author: User
I don't know if you have read these two books: pragmatic unit testing -- in Java with JUnit and pragmatic unit testing -- in C # With nunit. The content is very good. For example, let's inspire you to test this aspect and put forward a few days of pragmatic suggestions:
Are the resultsRight?
Are allBoundaryConditions correct?
Can you checkInverseRelationships?
Can youCross-checkResults using other means?
Can you forceError conditionsTo Happen?
ArePerformanceCharacteristics within bounds? This is also called: Right-bicep. What's the phrase correct: Conformance does the value conform to an expected format?
Ordering is the set of values ordered or unordered as appropriate?
Range is the value within reasonable minimum and maximum values?
Reference does the code reference anything external that isn't under direct control of the Code itself?
Existence does the value exist? (E.g., is non-null, non-zero, present in a set, etc .)
Cardinality are there exactly enough values?
Time (absolute and relative) Is everything happening in order? At the right time? In time? But is this really two books? Actually not. What is the similarity between the two books? I think there are at least 95%. To convert the nunit version to JUnit, you only need: 1. Replace C # With Java2, nunit with junit3, method name starting with uppercase with lowercase with 4, and attribute content with class inheritance 5... Basically, just a few simple principles have turned a book into another one. This illustrates a problem. Technology homogeneity is already very serious. As the book says:

but while the examples are in Java, using the JUnit framework, the concepts remain the same whether you are writing in C ++, Fortran, Ruby, smalltalk, or VisualBasic. testing frameworks similar to JUnit exist for over 60 different versions; these varous frameworks can be downloaded for free.

is similar to that of J2EE and. NET development ideas are also integrated. I feel numb to the increasingly noisy technological dust on the market. I began to miss the computer teaching materials that had been grayed out in the cupboard. I miss the excitement when I first read Andrew S. Tanenbaum's book...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.