The Inbox: ToolsTests-fbs.54.mcz

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

The Inbox: ToolsTests-fbs.54.mcz

commits-2
Frank Shearar uploaded a new version of ToolsTests to project The Inbox:
http://source.squeak.org/inbox/ToolsTests-fbs.54.mcz

==================== Summary ====================

Name: ToolsTests-fbs.54
Author: fbs
Time: 14 August 2012, 11:35:27.936 am
UUID: 308456b2-b9bf-428b-a698-9041cf4c29d9
Ancestors: ToolsTests-fbs.53

assert:equals:description gives better error messages for failing tests.

=============== Diff against ToolsTests-fbs.53 ===============

Item was changed:
  ----- Method: DependencyBrowserTest>>testClassList (in category 'testing - class list') -----
  testClassList
  "Warning!! When Collections' dependencies change, this test may start to fail!!"
+ self assert: #() equals: browser classList description: 'classList before package selection'.
- self assert: browser classList isEmpty.
 
  browser packageListIndex: (browser packageList indexOf: #Collections).
+ self assert: #() equals: browser classList description: 'classList after selecting Collections'.
- self assert: browser classList isEmpty.
 
  browser packageDepsIndex: (browser packageDeps indexOf: #Compiler).
+ self assert: #() equals: browser classList description: 'classList after selecting Compiler'.
- self assert: browser classList isEmpty.
 
  browser classDepsIndex: (browser classDeps indexOf: #Scanner).
+ self assert: #(String Symbol 'Symbol class') equals: browser classList description: 'classList after selecting Scanner class'.
- self assert: browser classList = #(String Symbol 'Symbol class').
 
  browser classListIndex: (browser classList indexOf: #Symbol).
+ self assert: #(String Symbol 'Symbol class') equals: browser classList description: 'classList after selecting Symbol class'.!
- self assert: browser classList = #(String Symbol 'Symbol class')!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ToolsTests-fbs.54.mcz

Frank Shearar-3
On 14 August 2012 11:35,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of ToolsTests to project The Inbox:
> http://source.squeak.org/inbox/ToolsTests-fbs.54.mcz
>
> ==================== Summary ====================
>
> Name: ToolsTests-fbs.54
> Author: fbs
> Time: 14 August 2012, 11:35:27.936 am
> UUID: 308456b2-b9bf-428b-a698-9041cf4c29d9
> Ancestors: ToolsTests-fbs.53
>
> assert:equals:description gives better error messages for failing tests.
>
> =============== Diff against ToolsTests-fbs.53 ===============

In particular, this test fails on the build server but not locally
(off what's hopefully an identical image). I'm hoping the extra
diagnostics will tell me what's going on there. And, of course,
assert:equals: is better than assert:. But that goes without saying.

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ToolsTests-fbs.54.mcz

Chris Muller-3
Just my 2-cents -- I was never a big fan of
#assert:equals:description: because it puts additional String literals
into the CM instances which... don't seem very useful -- because even
after I read the description I still have to read and understand the
code, which what you have here is not too complicated and, if it were,
the work should go into simplifying it rather than explaining it..  :)


On Tue, Aug 14, 2012 at 5:37 AM, Frank Shearar <[hidden email]> wrote:

> On 14 August 2012 11:35,  <[hidden email]> wrote:
>> Frank Shearar uploaded a new version of ToolsTests to project The Inbox:
>> http://source.squeak.org/inbox/ToolsTests-fbs.54.mcz
>>
>> ==================== Summary ====================
>>
>> Name: ToolsTests-fbs.54
>> Author: fbs
>> Time: 14 August 2012, 11:35:27.936 am
>> UUID: 308456b2-b9bf-428b-a698-9041cf4c29d9
>> Ancestors: ToolsTests-fbs.53
>>
>> assert:equals:description gives better error messages for failing tests.
>>
>> =============== Diff against ToolsTests-fbs.53 ===============
>
> In particular, this test fails on the build server but not locally
> (off what's hopefully an identical image). I'm hoping the extra
> diagnostics will tell me what's going on there. And, of course,
> assert:equals: is better than assert:. But that goes without saying.
>
> frank
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ToolsTests-fbs.54.mcz

Frank Shearar-3
On 14 August 2012 20:05, Chris Muller <[hidden email]> wrote:
> Just my 2-cents -- I was never a big fan of
> #assert:equals:description: because it puts additional String literals
> into the CM instances which... don't seem very useful -- because even
> after I read the description I still have to read and understand the
> code, which what you have here is not too complicated and, if it were,
> the work should go into simplifying it rather than explaining it..  :)

Yes re the "description:" part, partly. They're simply to disambiguate
the various asserts. The answer there is "only one assert per test",
but that's not terribly practical in this particular example, which
attempts to test a workflow.

But the value added by having a description in the CI environment...
that's worth _gold_.

It's still not good enough:

Error Message

classList after selecting Scanner class: Expected #(#String ...etc...
but was #(#Charact...etc....
Stacktrace

DependencyBrowserTest(TestCase)>>assert:description:
DependencyBrowserTest(TestCase)>>assert:equals:description:
DependencyBrowserTest>>testClassList
DependencyBrowserTest(TestCase)>>performTest

but it's a whole lot better than "assertion failed". The answer, a lot
of the time, is "don't have more than one assertion per method", but
in this case that would be a lot of extra work.

(It's still not good enough because the actual exception's message is
not truncated, and I haven't been able to find what's turning my
useful message into ...etc... Well, it's #printStringLimitedTo:,
obviously, but what's calling it?)

frank

> On Tue, Aug 14, 2012 at 5:37 AM, Frank Shearar <[hidden email]> wrote:
>> On 14 August 2012 11:35,  <[hidden email]> wrote:
>>> Frank Shearar uploaded a new version of ToolsTests to project The Inbox:
>>> http://source.squeak.org/inbox/ToolsTests-fbs.54.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: ToolsTests-fbs.54
>>> Author: fbs
>>> Time: 14 August 2012, 11:35:27.936 am
>>> UUID: 308456b2-b9bf-428b-a698-9041cf4c29d9
>>> Ancestors: ToolsTests-fbs.53
>>>
>>> assert:equals:description gives better error messages for failing tests.
>>>
>>> =============== Diff against ToolsTests-fbs.53 ===============
>>
>> In particular, this test fails on the build server but not locally
>> (off what's hopefully an identical image). I'm hoping the extra
>> diagnostics will tell me what's going on there. And, of course,
>> assert:equals: is better than assert:. But that goes without saying.
>>
>> frank
>>
>