Skip to content

Go Test config - not all tests being executed #1497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Quikr opened this issue Mar 28, 2015 · 15 comments
Closed

Go Test config - not all tests being executed #1497

Quikr opened this issue Mar 28, 2015 · 15 comments
Assignees
Milestone

Comments

@Quikr
Copy link

Quikr commented Mar 28, 2015

Builds runs the Tests of the 69 of 77 tests its says everything has passed (event log) but there 8 that it will not do.
Now if I run this in my other build environment everything runs as expected.
If I just select one of the tests that failed to run by itself it passes and works fine in the IDE.

Is there a limit of 69 tests that it can only execute?
As if I remove or add Tests it drops out at 69 Tests.

Running Webstorms 10.0
Go Plugin version 0.9.223

@dlsniper dlsniper added this to the 1.0.0 milestone Mar 28, 2015
@dlsniper
Copy link
Member

Can you send a project that can replicate the issue?

@dlsniper
Copy link
Member

@Quikr I'm running a series of 128 tests, with 40 skipped and all the tests appear correctly for me. I'm running the tests via the package option.

@Quikr
Copy link
Author

Quikr commented Mar 29, 2015

image
Ok as you can see on the left is Done 69 of 78.
Test_Postcode_Getoa was the last one, I created a second one "Test_Postcode_Getoa2" and it is being executed. It's in the output result log which is a bonus.
As you can from the left why do we have 9 entries in the Test Results? Shouldn't we have all or none?
Sorry I can't package it and send this one threw. I will look into a replicating something else.
To be honest if all the Tests are being executed then this is ok, Initial observations was some thing was not right.

@zolotov
Copy link
Contributor

zolotov commented Mar 29, 2015

@Quikr I'm sure that all tests are executed but something wrong with parsing output of go test. To recreate and fix this I need raw output of go test, please run the command that on the very top of test log in terminal and attach the output.

@Quikr
Copy link
Author

Quikr commented Mar 29, 2015

Ok, you are right my Logging is being done to the console, as such it confuses Test Parser when it's trying to determine if a Test has succeed or failed.
So after realizing this I have cleaned up console output and it ran fine.

As for an example it seems to be a hit and miss once I have something solid I will post it.

@Quikr
Copy link
Author

Quikr commented Mar 30, 2015

Ok, got it apparently if the last output to the console doesn't have a carriage return line feed it the Test parser can't see the result from the Test correctly.

func Test_Sp(t *testing.T) {
fmt.Println(" Test_Sp ")
lsStr := Sp(5)
if len(lsStr) != 5 {
t.Errorf("Invalid len of Returned string. ")
}
fmt.Print("Test_Sp............end")
// ^ if this is a Println it works fine if not it doesn't see the result.
}
Output. of Test.
S:/Tools/Go\bin\go test -v ./...
Testing started at 3:47 PM ...
Test_Sd
Test_Sp
Test_Sp............end--- PASS: Test_Sp (0.00s)
PASS
ok /S/Projects/Go/Spacer/src 0.031s

I have a simple project I can send threw.
While you at it can you point me to what I need to do to use the 'Go Application' with multiple files.

cheers
Quikr.

@zolotov
Copy link
Contributor

zolotov commented Mar 30, 2015

I've fixed the issue about tests, you can build plugin from sources or wait until nightly build will be ready (it's about 14 hours).

While you at it can you point me to what I need to do to use the 'Go Application' with multiple files.

Go Application run configuration doesn't cover all cases yet. How do you build it from console?

@Quikr
Copy link
Author

Quikr commented Mar 30, 2015

Go build -v -o Spacer.exe ./...

Given I am in the working folder of s:\projects\Go\Spacer
If I need something more complex as compiling for different platforms or forcing a package rebuild I will setup a set of batch files to fire off instead.
This is doing the job at the moment.

Doing a great jobs guys well done!

@zolotov
Copy link
Contributor

zolotov commented Mar 31, 2015

Go Application run configuration doesn't cover this case yet.
Actually I have some troubles with that. You can read about my concern at #1413 and #1414.
It would be cool if you would cooperate with @ccustine and will think of the universal solution for building (at least its concept, I can take responsible for implementation).

I'm closing the issue since the initial issue about tests is fixed. By the way, did you try the fixed version?

@Quikr
Copy link
Author

Quikr commented Mar 31, 2015

"Go Application" - will look into it further - to be honest, I do so much work around the 'Go Test' that the only think I would like is the support of color output (of my logging) in the run window but bash or Terminal is ok at the moment (it helps identifying key areas in my logging) .

Current Issue Tested against lastest nightly build and works fine. Thx.

@Quikr Quikr closed this as completed Mar 31, 2015
@2bitProgammer
Copy link

Speaking of the color output of the the logging - I've started playing around with the logger at "github.com/Sirupsen/logrus". One of the nice features of this logger is that it can log in color - However, when you try to log to stderr in IntelliJ the output is all red. Logging to stderr is nice as that's how the default logger logs, and thus if you try to log to stdout, you can get weird overlapping artifacts. Is there a way to prevent IntelliJ from logging the stderr text as all red?

@zolotov
Copy link
Contributor

zolotov commented Mar 31, 2015

One of the nice features of this logger is that it can log in color - However, when you try to log to stderr in IntelliJ the output is all red.

Please file a separate issue about that, I'll investigate it later.

Is there a way to prevent IntelliJ from logging the stderr text as all red?

Try Settings | Editor | Colors & Fonts | Console Colors | Log console error.

@2bitProgammer
Copy link

Hmm, I unmarked it, but it didn't seem to do anything

@zolotov
Copy link
Contributor

zolotov commented Mar 31, 2015

Maybe Console error output :)

@2bitProgammer
Copy link

Derrrrr. :)

I changed it and the coloring changed, however, I don't get the coloring
from the logging library. I created a new ticket for this as suggested.

On Tue, Mar 31, 2015 at 10:28 AM, Alexander Zolotov <
[email protected]> wrote:

Maybe Console error output :)


Reply to this email directly or view it on GitHub
#1497 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants