Questions tagged [tests]

21 questions
15
votes
6 answers

Why don't xUnit frameworks allow tests to run in parallel?

Do you know of any xUnit framework that allows to run tests in parallel, to make use of multiple cores in today's machine? If none (or so few) of them does it, maybe there is a reason... Is it that tests are usually so quick that people simply…
Xavier Nodet
  • 3,684
  • 2
  • 26
  • 33
14
votes
8 answers

How should I validate code when there is no one to do code review?

I'm used to working in a large development environment where code is peer reviewed and tested by the client, who is usually an IT person themselves. I am now working at a very small company where I'm not just the only developer, but the only IT…
14
votes
8 answers

Alternative to "Passing/Broken build" indicator?

When having a continuous integration executing the tests at each commit, a common best practice is to have all the tests passing at all times (aka "do not break the build"). I find some problems with that: For example one cannot help an open source…
Matthieu Napoli
  • 615
  • 2
  • 6
  • 13
9
votes
4 answers

What are some best practices for populating and using a test database?

So, I'm developing some database-driven RESTful Java web services, using Hibernate and MySQL. For testing purposes, I'm using the H2 in-memory database. H2 is nice and fast, so this has worked out really well. The only problem is that populating…
sangfroid
  • 3,219
  • 4
  • 17
  • 12
9
votes
1 answer

Can I have more than one describe per test spec?

I started to writing tests a few time ago and faced a non-mature question: can I have more than one describe per unit test file? If so, in what circumstances this will happen? Because so far, I'm describing a/an module/object like…
6
votes
2 answers

Multiple entrance points in project

My question is related to C++ but it comes from Java actually. When I was programming Java I had multiple classes, which were derived from a base "Test" class. Their purpose was to test things - run tests (unit tests/not unit tests). In order to…
luke1985
  • 219
  • 2
  • 8
5
votes
4 answers

Concurrent development w/o central design?

I've got a team of developers which are trying to write specifications/tests concurrently for different (and sometimes adjacent) parts of the system. Typically, the person writing the specification/test is not the developer who will write the…
lance
  • 303
  • 2
  • 7
5
votes
2 answers

Product Owner and automated tests

One of the claims of BDD-style development is that it bridges the gap between Product Owner and developers: the Product Owner writes a story, which can be converted in an equivalent automated test "frame" that should eventually pass. What I would…
Mathias
  • 332
  • 2
  • 8
4
votes
2 answers

Managing manual test protocols

We have to organize a very long list of manually running tests. Currently we use Word documents, print them out check them off etc. Ugh-ly but works, with problems. Problems with the current solution Requesting and executing subsets, depending on…
peterchen
  • 1,127
  • 8
  • 15
3
votes
4 answers

Should outgoing messages from object under test be tested?

I was watching a recording of a conference by Sandi Metz on testing. One of the things that I struggled with was that she said not to test outputs of the object under test (her example was query messages since she uses rails.) Here is a gist…
3
votes
5 answers

Do you test your SQL/HQL/Criteria?

Do you test your SQL or SQL generated by your database framework? There are frameworks like DbUnit that allow you to create real in-memory database and execute real SQL. But its very hard to use(not developer-friendly so to speak), because you need…
IAdapter
  • 1,345
  • 1
  • 9
  • 22
3
votes
2 answers

What kind of test should be given to Java EE programmers?

I'm looking to hire developers and I wish to test them. I have been especially told by my boss that we should have programmers on board that can consult on banking sector software and I'm to come up with the test. Now I've never done Java EE…
Dark Star1
  • 251
  • 2
  • 9
2
votes
1 answer

Should integration test coverage allow for lower unit test code coverage?

If a project has 30% coverage by unit tests, 40% due to integration tests, is it fair to say the total is 70% as so moderately well covered? Or are unit tests only ever used as the standard test type for code coverage metrics? Coverage is tracked…
2
votes
3 answers

designing classes for testability

I am writing a library for OVH api calls, and I am wondering how to make it friendly for unit tests. I have a class APIClient. The constructor of this class initializes the object with all parameters, but then immediately tries to perform…
Michał Zegan
  • 153
  • 1
  • 5
2
votes
4 answers

What's the point of Continuous Integration services like Travis CI?

As far as I can tell, services like Travis CI and CircleCI take your project and run its test suite whenever you push a new change to your repository. Assuming that it's also possible to either manually or automatically run such test suite locally…
1
2