Reputation: 13
I'm trying to write some test cases for my Qooxdoo application, and I think I need something similar to the "include" key in the "test" job, but it does not seem to be working for me.
The application is a client/server system where the server passes json objects to the client that are built locally. For example, the server might send:
{
"object": "foo.Window"
}
The client would then construct a new foo.Window locally. In order to get this to work without having a foo.Window created somewhere else in the client code, I need to have this in the jobs section of my config.json:
"source":{
"extend":[
"common"
],
"include":[
"foo.Window",
"foo.etc.*"
]
},
"build":{
"extend":[
"common"
],
"include":[
"foo.Window",
"foo.etc.*"
]
}
This instructs the generator to include the foo.Window class into the qx loader regardless of if it appears in the client source code. When I tried to create a test case for this scenario, I get an error that the class for foo.Window cannot be found in the testrunner application. I have tried to add an include key for both the test and test-source jobs following the examples listed above, but I get the same error. It works if I manually create a foo.Window in the test case, but in my real world application there are lots of different classes that need to be included. Is there a way to instruct the testrunner to include "foo.*" for my test suite?
Upvotes: 1
Views: 52
Reputation: 2807
The include list for the test application is defined in the "tests-common" job imported from testrunner.json. You can extend it in your application's config.json like so:
"testrunner::tests-common" :
{
"include" : ["foo.Window"]
}
Upvotes: 1