running Hapao on the String class - error: key not found in MethodDictionary for testClassComment
Hi there, I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code: Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load. Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable. Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String". Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image. Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
Hi sheridan spy string can be a challenge. Now I was thikning recently that we should have tests for Ring. So if you are interested I would love to review your tests. Sef Le 18/1/16 22:45, sheridan@sheridan-mahoney.com a écrit :
Hi there,
I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code:
Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load.
Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable.
Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String".
Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image.
Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
Hi, So this is not problem of Spy2, but a bug of Hapao. There should be no problem instrumenting String with Spy2 if your profiler is correct, the proof of this is that the image does not explode when you were debugging the execution (I was actually able to open a browser and check the tests of String). This problem happened because we naively assumed, at least in this implementation Hapao, that for every Test Object there is a Test Method associated in the class of the Test Object. This is not correct for inherited tests, where the Test Method is in one of the superclasses. I will submit a fix for that as soon as possible ;) Thanks for the bug report!! Alejandro
On Jan 19, 2016, at 8:58 AM, stepharo <stepharo@free.fr> wrote:
Hi sheridan
spy string can be a challenge. Now I was thikning recently that we should have tests for Ring. So if you are interested I would love to review your tests.
Sef
Le 18/1/16 22:45, sheridan@sheridan-mahoney.com a écrit :
Hi there,
I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code:
Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load.
Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable.
Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String".
Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image.
Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
Hi again! So I looked at the problem, wrote a fix, committed, created a new version and tested it. It should work out of the box :) Also the ConfigurationOfSpy should load Roassal by its own, so to download Hapao just run: ââ Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable. ââ Cheers! Alejandro
On Jan 19, 2016, at 4:25 PM, Alejandro Infante <alejandroinfante91@gmail.com> wrote:
Hi, So this is not problem of Spy2, but a bug of Hapao. There should be no problem instrumenting String with Spy2 if your profiler is correct, the proof of this is that the image does not explode when you were debugging the execution (I was actually able to open a browser and check the tests of String).
This problem happened because we naively assumed, at least in this implementation Hapao, that for every Test Object there is a Test Method associated in the class of the Test Object. This is not correct for inherited tests, where the Test Method is in one of the superclasses.
I will submit a fix for that as soon as possible ;)
Thanks for the bug report!! Alejandro
On Jan 19, 2016, at 8:58 AM, stepharo <stepharo@free.fr> wrote:
Hi sheridan
spy string can be a challenge. Now I was thikning recently that we should have tests for Ring. So if you are interested I would love to review your tests.
Sef
Le 18/1/16 22:45, sheridan@sheridan-mahoney.com a écrit :
Hi there,
I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code:
Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load.
Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable.
Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String".
Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image.
Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
Thanks Alejandro! I also bumped into this problem this very morning Cheers, Alexandre
On Jan 19, 2016, at 5:21 PM, Alejandro Infante <alejandroinfante91@gmail.com> wrote:
Hi again! So I looked at the problem, wrote a fix, committed, created a new version and tested it. It should work out of the box :)
Also the ConfigurationOfSpy should load Roassal by its own, so to download Hapao just run: ââ Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable. ââ
Cheers! Alejandro
On Jan 19, 2016, at 4:25 PM, Alejandro Infante <alejandroinfante91@gmail.com> wrote:
Hi, So this is not problem of Spy2, but a bug of Hapao. There should be no problem instrumenting String with Spy2 if your profiler is correct, the proof of this is that the image does not explode when you were debugging the execution (I was actually able to open a browser and check the tests of String).
This problem happened because we naively assumed, at least in this implementation Hapao, that for every Test Object there is a Test Method associated in the class of the Test Object. This is not correct for inherited tests, where the Test Method is in one of the superclasses.
I will submit a fix for that as soon as possible ;)
Thanks for the bug report!! Alejandro
On Jan 19, 2016, at 8:58 AM, stepharo <stepharo@free.fr> wrote:
Hi sheridan
spy string can be a challenge. Now I was thikning recently that we should have tests for Ring. So if you are interested I would love to review your tests.
Sef
Le 18/1/16 22:45, sheridan@sheridan-mahoney.com a écrit :
Hi there,
I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code:
Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load.
Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable.
Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String".
Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image.
Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
hi Sheridan, Let us know how it goes with Hapao Alexandre
On Jan 18, 2016, at 6:45 PM, sheridan@sheridan-mahoney.com wrote:
Hi there,
I am trying to use Hapao to check test coverage in the String class and have run across some trouble. To begin, I loaded Spy2 and Roassal2 using the following code:
Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; package: 'ConfigurationOfRoassal2'; load. (Smalltalk at: #ConfigurationOfRoassal2) load.
Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Spy2'; configurationOf: 'Spy2'; loadStable.
Hapao then showed up in the "World" menu, and I selected it. I chose "Hapao @ class ... " and entered "String".
Hapao starts running tests, but before long a debugger comes up with the error: KeyNotFound: key #testClassComment not found in MethodDictionary . IF I click "Proceed", other keyNotFound errors come up. This is in a 50524 image.
Is there something wrong with the way I am invoking Hapao? Many thanks, Sheridan
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (4)
-
Alejandro Infante -
Alexandre Bergel -
sheridan@sheridan-mahoney.com -
stepharo