Quantcast
Channel: Everyday I'm coding » unit-testing
Browsing index pages (10 articles)
↧

differences between 2 JUnit Assert classes

I’ve noticed that the JUnit framework contains 2 Assert classes (in different packages, obviously) and the methods on each appear to be very similar. Can anybody explain why this is? The classes I’m...

View Article


Python – doctest vs. unittest

I’m trying to get started with unit testing in Python and I was wondering if someone could inform me of the advantages and disadvantages of doctest and unittest. What conditions would you use each for?...

View Article


Unit test naming best practices [closed]

What are the best practices for naming unit test classes and test methods? This was discussed on SO before, at What are some popular naming conventions for Unit Tests? I don’t know if this is a very...

View Article

Why don’t they teach these things in school? [closed]

Over the summer, I was fortunate enough to get into Google Summer of Code. I learned a lot (probably more than I’ve learned in the sum of all my university coursework). I’m really wondering why they...

View Article

Why does this assert throw a format exception when comparing structures?

I’m trying to assert the equality of two System.Drawing.Size structures, and I’m getting a format exception instead of the expected assert failure. [TestMethod] public void AssertStructs() { var...

View Article


Image may be NSFW.
Clik here to view.

What is a reasonable code coverage % for unit tests (and why)?

If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be? Please explain how you arrived at your answer...

View Article

Best practice with unit testing abstract classes?

I was wondering what the best practice is for unit testing abstract classes and classes that extend abstract classes. Should I test the abstract class by extending it, stubbing out the abstract...

View Article

Javascript Unit-testing? [closed]

What’s the best way to go about running unit tests for Javascript? I’ve been playing around with Selenium IDE, but it’s Firefox-specific. Selenium RC looks… difficult – but is it the best way to run...

View Article


Is there a convention for distinguishing Python integration tests from unit...

The most common way of structuring a Python package with unit tests is as follows: package/ __init__.py module_1.py module_2.py module_n.py test/ __init__.py test_module_1.py test_module_2.py...

View Article


Image may be NSFW.
Clik here to view.

What is unit testing?

I saw many questions asking ‘how’ to unit test in a specific language, but no question asking ‘what’, ‘why’, and ‘when’. What is it? What does it do for me? Why should I use it? When should I use it...

View Article
Browsing index pages (10 articles)


Latest Images