-
Notifications
You must be signed in to change notification settings - Fork 122
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
[Accepted] SDL 0340 - ATF Selenium Support #1164
Comments
It might be noted that some of the negative test scenarios which are currently covered in ATF scripts looks like wouldn't be possible to rework within Selenium. E.g. scenarios where HMI doesn't respond to the requests from SDL.
ATF already has such validation functionality. E.g. Besides On a diagram we suppose communication between Section
|
|
The Steering Committee voted to keep this proposal in review, to allow the author time to determine a potential implementation for Item 5, and for any other discussion to continue on the review issue. |
@dboltovskyi Here is an initial idea for how ExpectRequest would be extended in actions.lua -- this would be contained in some config or common file
local HmiRpcSwitching = {
["UI.Show"] = {
expectRequest = {
validate = {
{
id = "#mainField1",
type = "text",
textParam = "mainField1"
}
}
}
}
}
function test.hmiConnection:ExpectRequest(pName, ...)
local event = events.Event()
event.matches = function(_, data) return data.method == pName end
local args = table.pack(...)
local ret = expectations.Expectation("HMI call " .. pName, self)
if #args > 0 then
ret:ValidIf(function(e, data)
local arguments
if e.occurences > #args then
arguments = args[#args]
else
arguments = args[e.occurences]
end
reporter.AddMessage("EXPECT_HMICALL",
{ ["Id"] = data.id, ["name"] = tostring(pName),["Type"] = "EXPECTED_RESULT" }, arguments)
reporter.AddMessage("EXPECT_HMICALL",
{ ["Id"] = data.id, ["name"] = tostring(pName),["Type"] = "AVAILABLE_RESULT" }, data.params)
return compareValues(arguments, data.params, "params")
end)
end
ret.event = event
event_dispatcher:AddEvent(self, event, ret)
test:AddExpectation(ret)
if HmiRpcSwitching[pName] ~= nil and HmiRpcSwitching[pName].expectRequest ~= nil then
ret.Do = function(_, func)
SeleniumManager.sendRequest(pname, args, HmiRpcSwitching[pName].expectRequest)
return self
end
end
return ret
end Behavior changes highlighted here: if HmiRpcSwitching[pName] ~= nil and HmiRpcSwitching[pName].expectRequest ~= nil then
ret.Do = function(_, func)
SeleniumManager.sendRequest(pname, args, HmiRpcSwitching[pName].expectRequest)
return self
end
end Idea is that if the RPC matches the expected request in the RPC Swtiching table, ATF will overwrite the |
@JackLivio Thank you for the example. Now the idea is more clear. |
We believe we should be able to return this proposal for the following revisions, which have been agreed to by the author and commenter:
|
The Steering Committee voted to return this proposal for the revisions described in this comment. |
The author has updated this proposal based on the Steering Committee's agreed upon revisions, and the revised proposal is now in review until August 10, 2021. The specific items that were updated since the last review can be found in this merged pull request: #1169. |
The Steering Committee fully agreed to accept this proposal. |
Implementation Issues Entered: |
Hello SDL community,
The review of of the revised proposal "SDL 0340 - ATF Selenium Support" begins now and runs through August 10, 2021. The original review of this proposal took place July 14 - July 27, 2021. The proposal is available here:
https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0340-atf-selenium-support.md
Reviews are an important part of the SDL evolution process. All reviews should be sent to the associated Github issue at:
#1164
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of SDL. When writing your review, here are some questions you might want to answer in your review:
Please state explicitly whether you believe that the proposal should be accepted into SDL.
More information about the SDL evolution process is available at
https://github.com/smartdevicelink/sdl_evolution/blob/master/process.md
Thank you,
Theresa Lech
Program Manager - Livio
theresa@livio.io
The text was updated successfully, but these errors were encountered: