Flexunit 4.1 compilation problem with locale
hello everyone,
i got problem with compilation of flexunit suite.
:builder:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':builder:test'.
> Compilation failed:
Error: Unable to resolve resource bundle "EditCourse" for locale "en_US".
Error: Unable to resolve resource bundle "EditScene" for locale "en_US".
Error: Unable to resolve resource bundle "ProjectCardParameters" for locale "en_US".
Error: Unable to resolve resource bundle "EditLesson" for locale "en_US".
Error: Unable to resolve resource bundle "ProjectCardParameters" for locale "en_US".
Error: Unable to resolve resource bundle "LessonsList" for locale "en_US".
Error: Unable to resolve resource bundle "EditLesson" for locale "en_US".
Error: Unable to resolve resource bundle "EditScene" for locale "en_US".
Error: Unable to resolve resource bundle "ProjectDetails" for locale "en_US".
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2 mins 1.141 secs
air part of my gradle build script:
air {
keystore = 'certificate/builder.p12'
storepass = 'xxxxxx'
srcDirs = ["src/main/flex"]
testDirs = ["src/test"]
localeDir = 'locale'
locales = ["en_US"]
mainClass = "builder"
includeFileTrees = [fileTree(dir: 'src/main/resources/')]//[fileTree(dir: 'src/main/flex/', inlcude: 'assets/empty.png')]
applicationDescriptor = "src/main/flex/builder-app.xml"
}
flexUnit {
command = "${flexHome}/bin/adl"
player = "air"
}
build/package work perfect but test isn't.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Yennick Trevels on 02 Jan, 2013 12:05 PM
Hi,
You have too many properties under 'air', some of these should be at the root level like this:
2 Posted by mordesku on 02 Jan, 2013 12:29 PM
same errors apears
Support Staff 3 Posted by Yennick Trevels on 02 Jan, 2013 12:54 PM
mmm, looks like it's a bug. We don't take the locale directory into account when executing the flexunit tests. I've created an issue for this and I'll fix it as fast as possible (after which a snapshot release will be available). https://github.com/GradleFx/GradleFx/issues/70
4 Posted by mordesku on 02 Jan, 2013 02:16 PM
I look forward, greetings
Support Staff 5 Posted by Yennick Trevels on 02 Jan, 2013 06:39 PM
I fixed the issue. Please try out the latest snapshot version of GradleFx which can be found in this repository: https://oss.sonatype.org/content/repositories/snapshots/
The version is 0.6.3-SNAPSHOT
Let me know if it works.
6 Posted by mordesku on 02 Jan, 2013 07:33 PM
same error, here is stacktrace
Support Staff 7 Posted by Yennick Trevels on 03 Jan, 2013 12:22 PM
I don't think you're using the latest snapshot version, because in your trace it passes in the Test class at line 85, which is blank in the newest GradleFx version (but does exist in the old version).
So make sure the top of your build script looks something like this:
8 Posted by mordesku on 03 Jan, 2013 01:46 PM
Top of my file was ok, but "builder" is subproject,. Main project build.gradle has defined old version of gradlefx. Now the suite is compiled and runable, so bug with locale is fixed. Now i got problem with running tests. After about 100 of test suites adl is not responding and i need to kill it. When i am running these tests from flashbuilder everythink is ok.
Support Staff 9 Posted by Yennick Trevels on 03 Jan, 2013 02:02 PM
The current default timeout is 60 seconds, so it's probably better if we just remove that default and have not timeout at all by convention.
You can change this timeout by doing this:
10 Posted by mordesku on 04 Jan, 2013 07:36 AM
Timeout isn't problem. Adl stop responding (attached screenshot)and i can wait forever. After adl termination i got test results but not complete:
Support Staff 11 Posted by Yennick Trevels on 04 Jan, 2013 07:52 AM
can you set the flexUnit execution in verbose mode as shown below and send me the output. Hopefully that will give some more information on why it's going wrong. Also run your build with the "--info" option.
12 Posted by mordesku on 04 Jan, 2013 08:30 AM
Here's my output
that line are interesting:
Support Staff 13 Posted by Yennick Trevels on 04 Jan, 2013 08:53 AM
Interesting indeed, I'll have a look.
Support Staff 14 Posted by Yennick Trevels on 04 Jan, 2013 11:06 AM
While this probably won't solve your problem, I just fixed the duplicate test source directory outputs which showed up in your output. The test source directories where added multiple times to the flexunit executor, now it's added only once.
A new snapshot version has been deployed and since it's a snapshot version you will automatically download it when you run the build again.
Support Staff 15 Posted by Yennick Trevels on 04 Jan, 2013 11:32 AM
I can now reproduce the issue of a hanging test. Now I'll have to investigate whether this is related to GradleFx or the FlexUnit ant task (which we are using).
16 Posted by mordesku on 04 Jan, 2013 11:36 AM
Problem with duplicate test source directory is fixed. You have right it doesn't solve my problem. Strange behavior of adl is appears when its launched from gradle. When i run it from cmd line all test go fine. I am launching it from build directory using these command:
so maybe problem lies on communication layer.
Support Staff 17 Posted by Yennick Trevels on 06 Jan, 2013 09:44 AM
I created an ant script (see attachment) which does exactly the same as we use it in GradleFx, and it's giving me the same issue. So I guess it isn't Gradle/GradleFx related but rather something in the FlexUnit ant task.
Support Staff 18 Posted by Yennick Trevels on 06 Jan, 2013 10:03 AM
I've posted a question on the Adobe FlexUnit forums about it with a test project. Hopefully that will help us. http://forums.adobe.com/thread/1130159
19 Posted by mordesku on 07 Jan, 2013 01:38 PM
I made some changes in ant task :) now i can display input buffer to console. In my case it look's like error in acionscript hang's up adl:
I am investigating forward but maybe you find out something to :). I think we can not count on adobe.
Support Staff 20 Posted by Yennick Trevels on 07 Jan, 2013 08:48 PM
I'm not counting on Adobe, but rather on Michael Labriola (who is the creator of FlexUnit). I know he answered most of the questions on that forum, so fingers crossed :)
Support Staff 21 Posted by Yennick Trevels on 11 Jan, 2013 06:45 PM
I just came past this: https://github.com/flexunit/flexunit/pull/8
It's a pull request that hasn't been merged into the flexunit code base. Not sure if this can fix our issue, but maybe it's worth a try to checkout the flexunit code, apply the patch and then build flexunit.
Support Staff 22 Posted by Yennick Trevels on 12 Jan, 2013 11:32 AM
Compiled FlexUnit myself with the patch applied, but it didn't fix the problem. Michael has responded to my post, so hopefully he can find some time to have a look at this.