test-suite

How can I best write unit test cases for a Parser?

I am writing a parser which generates the 32 bit opcode for each command. For example, for the following statement: set lcl_var = 2 my parser generates the following opcodes: // load immdshort 2 (loads the value 2) 0x10000010 // strlocal lclvar (lcl_var is converted to an index to identify the var) 0x01000002 Please note that lcl_...

C : POSIX threads library test-suite

I'm working on a thread library which implement user level threads (i have something like pthread_setscope which works) and I'm looking for some set of tests to avoid writing one for every function I implement (mutexes, conditions, etc ...) Does anyone know something like that? ...

How can I test a PDF document if it is PDF/A compliant?

We write a software that create PDF files. How we can check if the resulting pdf files are PDF/A compatibility? Are there any test suite for it available? It will be also nice to know if some other product like Open-Office produce PDF/A compatibility files. ...

JUnit Test Runner that creates tests just before running them

I use JUnit 3.x TestRunner that intantiates all tests at once before running them. Is there a Test Runner available that would create each test (or at least each test suite's tests) just before running them? I can use JUnit 4.x runners but my tests are 3.x tests. ...

Test Suite unittest

Hello, I have a test suite and I am trying to get it to work with the tests I have created. The test work if I run them individually but I want to run them all in a test suite. The code below show the test suite created: import unittest def suite(): modules_to_test = ('TestAbsoluteMove', 'TestContinuousMove') # and so on allte...

Running JUnit test classes from another JUnit test class

I have two classes that I am testing (let's call them ClassA and ClassB). Each has its own JUnit test class (testClassA and testClassB respectively). ClassA relies on ClassB for its normal functioning, so I want to make sure ClassB passes its tests before running testClassA (otherwise the results from testClassA would be meaningless). ...

Does new JUnit 4.8.1 @Category render test suites almost obsolete?

Given question 'How to run all tests belonging to a certain Category?' and the answer would the following approach be better for test organization? define master test suite that contains all tests (e.g. using ClasspathSuite) design sufficient set of JUnit categories (sufficient means that every desirable collection of tests is identifi...

Basics of automated tests?

Hi, Till now I've been testing my web (usually written in PHP) as well as desktop applications (normally Java or C#) manually. Now I read somewhere on the net about automated tests. I tried searching to know about it in details but almost all searches end up at things like PHPUnit. Could someone please put some light on the theory behind...

rake test and test_structure.sql

First of all, I have to run "rake RAILS_ENV=test ..." to get the test suites to hit my test DB. Annoying but ok to live with. However when I do so, I get a long stream of errors like so: > rake RAILS_ENV=test -I test test:units psql:/path/to/project/db/test_structure.sql:33: ERROR: function "armor" already exists with same argument ty...

Unit Testing Interfaces in Python

I am currently learning python in preperation for a class over the summer and have gotten started by implementing different types of heaps and priority based data structures. I began to write a unit test suite for the project but ran into difficulties into creating a generic unit test that only tests the interface and is oblivious of th...

Log information inside a JUnit Suite

I'm currently trying to write inside a log file the total number of failed tests from a JUnite Suite. My testsuite is defined as follows: @RunWith(Suite.class) @SuiteClasses({Class1.class, Class2.class etc.}) public class SimpleTestSuite {} I tried to define a rule which would increase the total number of errors when a test fails, bu...

JUnit 4 test suite problems

Hi, I have a problem with some JUnit 4 tests that I run with a test suite. If I run the tests individually they work with no problems but when run in a suite most of them, 90% of the test methods, fail with errors. What i noticed is that always the first tests works fine but the rest are failing. Another thing is that a few of the tests...

Execute setup() once workaround causing TestSuit to fail

I have 2 files: xxxxxTest.java [refer this] public class xxxxxTest extends TestCase { // Run setup only once public static Test suite() { TestSetup setup = new TestSetup(new TestSuite(xxxxxTest.class)) { protected void setUp() throws Exception { //Some init which i need only once }...

Grails integration testsuite suite

Hello All, We have a set of integration test which depend upon same set of static data. Since the amount of data is huge we dont want to set it up per test level. Is it possible to setup data at the start, run group of test and rollback the data at the end of test. What we effectively want is the rollback at test suite level rather tha...

How to execute test suites based on requirement in boost.test library

Hello, I am using Boost.Test library for implementing unit test cases in C++. Suppose I have two suites such as BOOST_AUTO_TEST_SUITE(TestA) BOOST_AUTO_TEST_CASE(CorrectAddition) { BOOST_CHECK_EQUAL(2+2, 4); } BOOST_AUTO_TEST_CASE(WrongAddition) { BOOST_CHECK_EQUAL(2 + 2, 5); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE...