Closed Jyothishkumarav closed 1 year ago
Currently we don't have a concrete logic to determine if a test execution is pass/fail. We just check all appium commands except findElement
and isDisplayed
for any errors. if those commands result in error, we mark those tests as failed. We also provide an option to update the test status from the code.
Java client:
driver.executeScript("dashboard: updateStatus", ImmutableMap.of("status", "passed"));
Webdriver.IO:
driver.executeScript("dashboard: updateStatus", [{status: "passed"}]);
Thanks for the update
I have tried with above code, but getting below response from appium server. i am using python appium client driver.execute_script("dashboard: updateStatus", '''[{"status": "passed"}]''')
Calling AppiumDriver.execute() with args: ["dashboard: updateStatus",["[{\"status\": \"passed\"}]"],"2e7e7af9-bd05-40db-acf7-aba6ffa1ee95"] [AppiumDriver@20f6] Plugins which can handle cmd 'execute': appium-dashboard [AppiumDriver@20f6] Plugin appium-dashboard is now handling cmd 'execute' [AppiumDriver@20f6] Command 'execute' was *not* handled by the following behaviours or plugins, even though they were registered to handle it: ["default"]. The command *was* handled by these: ["appium-dashboard"]. [debug] [AndroidUiautomator2Driver@497f (2e7e7af9)] Responding to client with driver.execute() result: true
Can you try using driver.execute_script("dashboard: updateStatus", '''{"status": "passed"}''')
?
How are you seeing a session execution test status as passed or failed. my test cases were passed in a single session. However in dashboard result it is showing as failed.