SUnit: latest developments

434 views

Published on

Show Us Your Project, ESUG 2014, Cambridge

Published in: Software
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
434
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SUnit: latest developments

  1. 1. 1 Welcome August 19, 2014 SUnit: latest developments Niall Ross, Cincom Jan Vrany, eXept Sunit Open-Source project
  2. 2. Debugging Suites that use Resources •Run suite with resources: see failure Debug the failing test: see it pass Debug all tests in suite: see them all pass What’s happening? earlier test affected resource-managed state, caused failure •e.g. earlier test created data in a table the resource creates in database TestCase>>debug tears down resources for each test •TestResource’s table torn down and recreated – interfering data is gone •The Fix: new method TestResource>debug a polymorph of TestCase>>debug
  3. 3. TestSuite, TestResult pluggable in base •Prior ESUG: pluggable in your test runner tools Stephane said “Put it in the base.” Niall said: “Shape-change in base is a big deal …” •… now: pluggable in the base •TestCase>>suiteClass: myTestSuiteSubclass TestCase>>suiteClass ^SuiteClass ifNil: [TestSuite] •PluggableTestSuite = pluggable TestResult subclasses RandomSuite, MinimalResConflictSuite, … ClassifiedTestResult, …
  4. 4. Other Stuff •TestCase/Suite>>run/run: API methods have better comments #run tears down resources #run: does not •TestCase>>asNew override in (very rare) case that your tests have key instvars •Deprecated methods: (anyone use them?) #debugAsFailure, #openDebuggerOnFailingTestMethod, #runCaseAsFailure: •TestCase>>= and >>hash in base SUnit
  5. 5. Slim SUnit v. Fat SUnit? •slim base SUnit Load base SUnit for • TestCase, TestSuite, TestResult , TestResource (and TestAsserter) Load SUnit<Specific> for •Examples of Pluggable TestSuite and TestResult subclasses •Examples of other TestCaseOutcomes, e.g. TestSkip assimilated to #expectedFailures •Other SUnit OS-project stuff •fat base SUnit Load base SUnit to get much more (than you want)?

×