Skip to content
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

Switch off XML Report by default #170

Merged
merged 2 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions modules/atf_logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ local controlMessagesHB = {}
controlMessagesHB[ford_constants.FRAME_INFO.HEARTBEAT] = "Heartbeat"
controlMessagesHB[ford_constants.FRAME_INFO.HEARTBEAT_ACK] = "HeartbeatACK"

Logger.mobile_log_format = "%s (%s) [%s, sessionId: %s, version: %s, frameType: %s, "
.. "encryption: %s, serviceType: %s, frameInfo: %s, messageId: %s, binaryDataSize: %s] : %s \n"
Logger.hmi_log_format = "%s (%s) : %s \n"
Logger.mobile_log_format = "%s [%s] [%s, sessionId: %s, version: %s, frameType: %s, "
.. "encryption: %s, serviceType: %s, frameInfo: %s, messageId: %s, binaryDataSize: %s] : %s \n\n"
Logger.hmi_log_format = "%s [%s] %s \n"

local rpc_function_id

Expand Down Expand Up @@ -93,7 +93,7 @@ function Logger.formated_time(without_date)
if without_date == true then
return qdatetime.get_datetime("hh:mm:ss,zzz")
end
return qdatetime.get_datetime("dd MM yyyy hh:mm:ss, zzz")
return qdatetime.get_datetime("dd-MM-yyyy hh:mm:ss,zzz")
end

--- Check message is it HMI tract
Expand Down Expand Up @@ -123,7 +123,7 @@ end
-- @tparam string tract Tract information
-- @tparam string message String representation of message from mobile application to SDL
function Logger:MOBtoSDL(tract, message)
local log_str = string.format(Logger.mobile_log_format,"MOB->SDL ", Logger.formated_time(),
local log_str = string.format(Logger.mobile_log_format,"MOB->SDL", Logger.formated_time(),
get_function_name(message), message.sessionId, message.version, message.frameType,
message.encryption, message.serviceType, message.frameInfo, message.messageId, getBinaryDataSize(message.binaryData), message.payload)
if is_hmi_tract(tract, message) then
Expand Down Expand Up @@ -167,7 +167,7 @@ end
-- @tparam string tract Tract information
-- @tparam string message String representation of message from HMI to SDL
function Logger:HMItoSDL(tract, message)
local log_str = string.format(Logger.hmi_log_format, "HMI->SDL", Logger.formated_time(), message)
local log_str = string.format(Logger.hmi_log_format, "HMI->SDL", Logger.formated_time(), message .. "\n")
if is_hmi_tract(tract, message) then
self.atf_log_file:write(log_str)
end
Expand Down Expand Up @@ -244,18 +244,16 @@ function Logger.init_log(script_name)
return Logger
end

--- Store auxiliary message about start of new test step of test scenario into ATF log file (only if `config.excludeReport` is set to `false`)
--- Store auxiliary message about start of new test step of test scenario into ATF log file
-- @tparam string test_case Test step name
function Logger.LOGTestCaseStart(test_case)
if config.excludeReport then return end
Logger:StartTestCase(test_case)
end

--- Store message on baasis on tract information into ATF log file
-- @tparam string tract Tract information
-- @tparam string message String representation of message
function Logger.LOG(tract, message)
if config.excludeReport then return end
Logger[tract](Logger, tract, message)
end

Expand Down
2 changes: 1 addition & 1 deletion modules/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ config.ShowTimeInConsole = true
--- Flag which defines whether ATF performs validation of Mobile and HMI messages by API
config.ValidateSchema = true
--- Flag which defines whether ATF ignores collecting of reports
config.excludeReport = false
config.excludeReport = true
--- Flag which defines whether ATF creates full ATF logs (with json files and service messages)
config.storeFullATFLogs = true
--- Flag which defines whether ATF stores full SDLCore logs
Expand Down