SUnit missing tests.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SUnit missing tests.

R. Clayton
I have a project with the following categories and classes:

  ContextFreeGrammar
    ContextFreeGrammar
    ContextFreeGrammarTests
    GrammarProduction
    GrammarProductionTests
  EarleyParser
    EarleyParser
    EarleyParserTestCases
    EarleyParserTests
    ParseState
    ParseStateSet
    ParseStateSetTests
    ParseStateTests

When I open a SUnit test runner, it lists the following:

  [blah blah blah]

  ColorTest
  CompiledMethodTest
  ComplexTest
  DateAndTimeEpochTest

  [blah blah blah]

  DurationTest
  EarleyParserTestCases
  EarleyParserTests
  EventManagerTest

  [blah blah blah]

  FractionTest
  HashAndEqualsTestCase

  [blah blah blah]

  OrderedCollectionTest
  ParseStateSetTests
  ParseStateTests
  PasteUpMorphTest

  [blah blah blah]

That is, it's missing ContextFreeGrammarTests and GrammarProductionTests.  How
can I fix or get around this?  I've tried various combinations of

 1 switching between "Test" and "Tests",

 2 filing out, deleting, and filing back in, and

 3 closing and reopening the test runner

with no success.  This is squeak 3.8 update 6665 on a debian testing system.


Reply | Threaded
Open this post in threaded view
|

Re: SUnit missing tests.

Diego Fernández
If you use the Test Runner in 3.9, take a look at TestRunner>>findCategories and TestRunner>>findClassesForCategories:  maybe you can debug those methods to see what's happening.
Also if you could print:
(TestCase buildSuite tests collect: [:aTest | aTest class ]) asSet includes: YourMissingTestCaseClass

If this returns true.. then is a problem in the test runner, if returns false, maybe your TestCase declares #isAbstract as true, or the super-class is incorrect.

I hope this helps.
Cheers,
Diego


On 02 Jun 2006 15:57:32 -0400, R. Clayton <[hidden email] > wrote:
I have a project with the following categories and classes:

  ContextFreeGrammar
    ContextFreeGrammar
    ContextFreeGrammarTests
    GrammarProduction
    GrammarProductionTests
  EarleyParser
    EarleyParser
    EarleyParserTestCases
    EarleyParserTests
    ParseState
    ParseStateSet
    ParseStateSetTests
    ParseStateTests

When I open a SUnit test runner, it lists the following:

  [blah blah blah]

  ColorTest
  CompiledMethodTest
  ComplexTest
  DateAndTimeEpochTest

  [blah blah blah]

  DurationTest
  EarleyParserTestCases
  EarleyParserTests
  EventManagerTest

  [blah blah blah]

  FractionTest
  HashAndEqualsTestCase

  [blah blah blah]

  OrderedCollectionTest
  ParseStateSetTests
  ParseStateTests
  PasteUpMorphTest

  [blah blah blah]

That is, it's missing ContextFreeGrammarTests and GrammarProductionTests.  How
can I fix or get around this?  I've tried various combinations of

1 switching between "Test" and "Tests",

2 filing out, deleting, and filing back in, and

3 closing and reopening the test runner

with no success.  This is squeak 3.8 update 6665 on a debian testing system.





Reply | Threaded
Open this post in threaded view
|

Re: SUnit missing tests.

Diego Fernández
Sorry I didn't see that you are using Squeak 3.8... I think that in 3.8 the TestRunner is... TestRunner :) too. Maybe the method is different, but if the test is on the TestSuite created by TestCase, it should appear in the TestRunner

On 6/2/06, Diego Fernandez <[hidden email]> wrote:
If you use the Test Runner in 3.9, take a look at TestRunner>>findCategories and TestRunner>>findClassesForCategories:  maybe you can debug those methods to see what's happening.
Also if you could print:
(TestCase buildSuite tests collect: [:aTest | aTest class ]) asSet includes: YourMissingTestCaseClass

If this returns true.. then is a problem in the test runner, if returns false, maybe your TestCase declares #isAbstract as true, or the super-class is incorrect.

I hope this helps.
Cheers,
Diego



On 02 Jun 2006 15:57:32 -0400, R. Clayton <[hidden email] > wrote:
I have a project with the following categories and classes:

  ContextFreeGrammar
    ContextFreeGrammar
    ContextFreeGrammarTests
    GrammarProduction
    GrammarProductionTests
  EarleyParser
    EarleyParser
    EarleyParserTestCases
    EarleyParserTests
    ParseState
    ParseStateSet
    ParseStateSetTests
    ParseStateTests

When I open a SUnit test runner, it lists the following:

  [blah blah blah]

  ColorTest
  CompiledMethodTest
  ComplexTest
  DateAndTimeEpochTest

  [blah blah blah]

  DurationTest
  EarleyParserTestCases
  EarleyParserTests
  EventManagerTest

  [blah blah blah]

  FractionTest
  HashAndEqualsTestCase

  [blah blah blah]

  OrderedCollectionTest
  ParseStateSetTests
  ParseStateTests
  PasteUpMorphTest

  [blah blah blah]

That is, it's missing ContextFreeGrammarTests and GrammarProductionTests.  How
can I fix or get around this?  I've tried various combinations of

1 switching between "Test" and "Tests",

2 filing out, deleting, and filing back in, and

3 closing and reopening the test runner

with no success.  This is squeak 3.8 update 6665 on a debian testing system.






Reply | Threaded
Open this post in threaded view
|

Re: SUnit missing tests - fixed.

R. Clayton
In reply to this post by R. Clayton
Thanks to a message from Ralph Johnson, I've traced to the problem to bad
parenting: the context-free grammar and grammar production test classes somehow
had their parent changed to ProtoObject, which made them invisible to SUnit.
Changing the parent back to TestCase fixed the problem.