MAC - Screenshots for pass tests are not shown in Reports

I am running test on Mac. I can see screenshots only for failed tests, but not for pass tests.

Tried below code still no luck.
seetest = new SeeTestClient( driver );
seetest .setShowPassImageInReport( true );

Am I missing something.

Do yo mean that you do not see any of the screenshot even if you have following capabilties set

dc.setCapability(“reportDirectory”, reportDirectory);
dc.setCapability(“reportFormat”, reportFormat);
dc.setCapability(“testName”, testName);

Later in tearDown() function you should ideally have

seetest.generateReport(false); or seetest.generateReport(true)

Thats right. I don’t see the screenshot for pass tests with the below capabilities.

dc.setCapability(“reportDirectory”, reportDir);
dc.setCapability(“reportFormat”, config.get(“ReportFormat”));
dc.setCapability(“testName”, testName);
dc.setCapability(“platformName”, “iOS”);
dc.setCapability(“autoDismissAlerts”, true );
dc.setCapability(“android.instrumentation.camera”, true );
dc.setCapability(“android.instrumentation.security”, true );
dc.setCapability(“instrumentApp”, true );
dc.setCapability(MobileCapabilityType. UDID , deviceId);

driver = new IOSDriver<>( new URL(config.get(“DriverHost”)), dc);
driver .setLogLevel(Level. INFO );

seetest = new SeeTestClient( driver );

And at the tearDown() I have seetest.generateReport(true);

Please try any test with Eribank Application (sample application provided in Appium Studio ) , test record with creds “company”/“company” and see if you get the same problem i that application.

Just want to make sure that its same behavior across all the application.

Please also attach/or paste the report here .

Since I am using simulators, cannot install the eribank.ipa. No .app file available.

2019-08-27 23:23:52,503 [BackgroundTask-3–Import from disk] (app.application.ApplicationToolBarController) INFO Start importing EriBank.ipa application
2019-08-27 23:23:52,507 [BackgroundTask-3–Import from disk] (instrumentation.ios.IosInstrumentation) DEBUG work dir: /private/var/folders/3k/5lnp2x6x2v71_ttjm2w238h40000gp/T/AppiumStudio/out2682308975911474003
2019-08-27 23:23:52,651 [BackgroundTask-3–Import from disk] (instrumentation.ios.IosInstrumentation) DEBUG Found no *.app folder under directory /private/var/folders/3k/5lnp2x6x2v71_ttjm2w238h40000gp/T/AppiumStudio/out2682308975911474003

Thanks,

okay so I did manage to get the EperiBank.app file using ExperiBank project at Github.

Ran a simple test from Appium Studio. screenshots are getting generated for pass result. Looks like something to do with my framework setup.

Check in the logs if you see wierd warnings or error when you run test with your app, that may give us some hints, try to paste any such things in here

The script that was created on ExperiBank generate reports with pass screenshot when run directly from Appium.
If I run the same script from eclipse, the report doesn’t have screenshots for pass tests.
I have attached the report for reference.

No errors in the Appium logs

Ashwin, I am able to get screenshot for passed steps in reports even when I run from Intelij. So this is not the problem else lot of users would have reported by now.

Following is the code I run, I am running Windows machine Appium Studion/Android device combination

@BeforeMethod
public void setUp() throws MalformedURLException {
dc.setCapability(“reportDirectory”, reportDirectory);
dc.setCapability(“reportFormat”, reportFormat);
dc.setCapability(“testName”, testName);
dc.setCapability(MobileCapabilityType.UDID, “b6fe6cc8”);
dc.setCapability(MobileCapabilityType.APP, “C:\Users\kishore.kameshwar\AppData\Roaming\appiumstudio\apk\com.experitest.ExperiBank.LoginActivity.2.apk”);
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, “com.experitest.ExperiBank”);
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, “.LoginActivity”);
dc.setCapability(“instrumentApp”, true);
driver = new AndroidDriver<>(new URL(“http://localhost:5000/wd/hub”), dc);
client = new SeeTestClient(driver);
driver.setLogLevel(Level.INFO);

    //client.setReporter("xml", "c:\\experitest" , "new");
}

@Test
public void testUntitled() {
    driver.executeScript("client:client.startStepsGroup(“Login step”)");
    driver.findElement(By.xpath("//*[@id='usernameTextField']")).sendKeys("company");
    driver.findElement(By.xpath("//*[@hint='Password']")).sendKeys("company");
    new WebDriverWait(driver, 10).until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@text='Login']")));
    driver.findElement(By.xpath("//*[@text='Login']")).click();
}

Hi Kishore,

As mentioned in original post, the issue I am facing is when I run tests on Mac. I don’t see any issues when I run same tests from windows.

Thanks,

" I am running test on Mac. I can see screenshots only for failed tests, but not for pass tests.

Tried below code still no luck.
seetest = new SeeTestClient( driver );
seetest .setShowPassImageInReport( true );

Am I missing something."

But then your original post (pasted above) did not mention that this is “Only” replicable in mac and Windows everything works fine.

Thanks,

You are right. In the original post I did not mention that its is working fine in windows nor i mentioned that it is not working fine in windows. The original post says running on Mac, does not talk about windows. Since you mentioned about windows I had to reply saying that I don’t see issue on windows.

Please let me if this is a known issue on Mac.

Thanks.

Not a problem. Ashwin.

Actually I do not know this as an known issue. It actually should have worked.
But then I let me ask in my circle who are mac users can replicate it. I suggest you to do the same.

I suggest you to change this subject so that other mac users in this forum can update.