Closed Frogli closed 6 years ago
Does it make a difference if the testing library is open or not when you invoke Jump to counterpart?
It makes no difference. I just tested both scenarios
I tried reproducing this, but it's working properly for me.
Would you please throw a breakpoint at omnistap.ogTAPMenuController.$_addTestClass().20
and step into $cinst.$_doesLibraryUseSeparateTestLibary()
? Does this method return kTrue in your environment?
All right, thanks for giving this clue. I got it working. I did the following:
[lib]_Tests.Startup_Task.$superclass
should have the value omnistap.kgTAPTask
Quit method kTrue
Actually just like the wiki says about this... @barkingfoodog You did not made any changes to the libraries before trying to reproduce my problem?
Side note: I had to make the same adjustments for the production library. Otherwise I could not run the test with the shortcut Cmd+Shift+R. Without them the UnitTest window is shown with a yellow output button. Not sure these adjustments are as it should be. Either one should inherit omnistap.kgTAPTask
or not?
@Frogli I created a new production and testing library to try and replicate this. Are you working with an example? Im not sure what you mean by "made any changes to the libraries".
If you're running the tests from a separate testing library, it would be ideal that you don't have to subclass the primary library's Startup_Task
from omnistap.kgTAPTask
. However, that might be required to get the Jump to Counterpart command to work.
Oh sorry, I thought I mentioned a sample, but apparently not. I used the repository OmnisTapCliSeparateLib as an example.
I used this example also to run the test from the separate library and experienced what I mentioned in my last comment.
Ah, now I follow. :) Yes, setting zCarShop_tests.Startup_Task
to subclass omnistap.kgTAPTask
and setting $useSeparateTestLibrary
allows the jump to work. One caveat is that the task for the test library should be running so OmnisTAP can call $useSeparateTestLibrary()
. I added a note to the wiki to explain this.
When you use the function Jump to counterpart from a production class the first time from that class a testcase class is made. In the
$setup
of that newly made class an instanceirMock
is create from the production class. Unfortunately this is not happening when the testclasses are in a separate librarySteps to reproduce
$setup
in the method list