History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2586
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Steve Luo
Reporter: Phong Trinh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Issue with error detecting

Created: 19/Nov/15 11:42 PM   Updated: 25/Nov/15 12:49 AM
Return to search
Component/s: None
Affects Version/s: 6.0.21
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
 Hi Robin and Support Team,
 The log entries had an error as the follows, but QB reported as successful step:
   23:34:46,070 INFO - Checking step execute condition...
   23:34:46,070 INFO - Step execute condition satisfied, executing...
   23:34:46,115 INFO - Executing pre-execute action...
   23:34:46,115 INFO - Running step...
   23:34:46,159 ERROR - The coverage test is FAILED.
   23:34:46,159 INFO - Executing post-execute action...

 Please look into as your earliest chance.

 Thanks,
ptrinh

 All   Comments   Work Log   Change History      Sort Order:
Change by Robin Shen [20/Nov/15 12:23 AM]
Field Original Value New Value
Assignee Robin Shen [ robinshine ] Steve Luo [ steve ]

Steve Luo [20/Nov/15 02:03 AM]
What kind of step you were running? And do you know how this message is generated?

Phong Trinh [20/Nov/15 02:50 AM]
It is Misc Script step. I trigger an error using logger.error when my test is failed.

Steve Luo [20/Nov/15 02:57 AM]
If you want to fail the build, you need throw Exception when error occurs (tests failed) in your script.

Phong Trinh [20/Nov/15 03:09 AM]
Sorry for misunderstanding. I just create a step to check the percentage of my test result in the previous test step. If the result is greater than 85%, pass the test; else, trigger an error to fail the step.

Steve Luo [20/Nov/15 03:24 AM]
So how you trigger the error? By logging an error or throw exception?

Phong Trinh [20/Nov/15 03:31 AM]
I would like to log an error and QB to report as a failed step. Is there any way that I can configure a pattern to detect error in the log file?

Steve Luo [20/Nov/15 03:40 AM]
If you throw the exception, QB will log the error and failed the step automatically.

Phong Trinh [24/Nov/15 02:59 PM]
Thanks ... I throw an error to fail the step if the condition is true; however, I still think it is a QB issue, because QB should catch ERROR in the build log or provides an option to set pattern for error detect as 'shell/ batch command' step.

Change by Steve Luo [25/Nov/15 12:44 AM]
Comment [ By default, for "Shell/Batch Command" step, QB will detect the return code from the command, if it is NOT zero, QB will fail the step.
You can also detect errors by pattern. In step settings, there is a checkbox named "Detect Error", if you tick the checkbox, you can add your patterns there to catch the ERROR part in your command output. ]

Steve Luo [25/Nov/15 12:48 AM]
QuickBuild fail the build according to the steps running status instead of detecting the build log. Actually, anytime if user can write some errors in the build log, she/he can of cause decide to fail the step or not.

Change by Steve Luo [25/Nov/15 12:49 AM]
Status Open [ 1 ] Closed [ 6 ]
Resolution Won't Fix [ 2 ]