Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Why is the test result showing only 1 method was run?

Raul Mar 20, 2017 01:49PM CET

I ran some small tests in order to see how the testdroid could is showing me the results.

So I had this small test with only 2 methods. At the end of the test I see in the tests results screen:
Test Methods 1/ 1
Should be 2/2 ?

Up 0 rated Down
Bitbar Company Mar 20, 2017 04:19PM CET Bitbar Testing help Agent
Hello,

It really depends on how the test package is implemented, which framework you have used, and how tests are constructed. For example, if you haven't separated tests as their own functions, those might be included in one test method.

Best regards,
Bitbar Support
Up 0 rated Down
Raul Mar 20, 2017 05:50PM CET
I am using Java, Selenium and jUnit.

A test is something like:
public class TestSearchItemLongStringInvalid extends MobileUtils {

@Test
public void Test01_TestSearchItemLongStringInvalid_WelcomeScreen()
{
initExtendLog(varSettings[20],"OwnZones iOS - Test Search Item Long String", "Test the search for an item using more than 3 characters");
extentLog.log(LogStatus.INFO, "Testing: " + getCurrentClassAndMethodNames());

if (isElementPresent(By.xpath("//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeAlert[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeButton[1]")))
{
tapElementByXpath("//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeAlert[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeButton[1]");
}

tapElementByName(locator[0]);

System.out.println(driver.getSessionId());
}

@Test
public void Test02_TestSearchItemLongStringInvalid_CloseChromecast()
{
extentLog.log(LogStatus.INFO, "Testing: " + getCurrentClassAndMethodNames());

sleep(2000);

if ( isElementPresent(By.xpath("//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeStaticText[1]")))
{
MobileElement textElement = returnElementByXpath("//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeStaticText[1]");

if (textElement.getAttribute("name").equals("Touch to cast videos to your TV"))
{
textElement.click();
}
}
}

@Test
public void Test03_TestSearchItemLongStringInvalid_GoToSearch()
{
extentLog.log(LogStatus.INFO, "Testing: " + getCurrentClassAndMethodNames());

tapElementByName("Search");
}

}
Up 0 rated Down
Tuukka Tuomaala Mar 21, 2017 12:44PM CET Bitbar Testing help Agent
Hi Raul,

I see that you are running Appium Client Side test runs. Logs show that testsuite name="default-testsuitename" and testcase classname="default-testcase-class" name="default-testcase". I suspect that these are not correct? For starting iOS Appium Client Side runs please refer to http://docs.testdroid.com/appium/examples/java-client-side-example/#starting-ios-test

Best regards,

Tuukka Tuomaala
Up 0 rated Down
Raul Mar 21, 2017 04:24PM CET
Hi,

The test/suites names are correct. I am running them from my eclipse because I would like not to use the maven environment..

Do I really need to use maven?
Up 0 rated Down
Tuukka Tuomaala Mar 22, 2017 08:05AM CET Bitbar Testing help Agent
Hi,

You can read more about setting up Eclipse for Testdroid from http://docs.testdroid.com/espresso/#espresso-and-bitbar-testing

An example of Eclipse project in here http://docs.testdroid.com/assets/testdroid-cloud-integration/annotations.zip

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Contact Us

support@bitbar.com
http://assets3.desk.com/
false
bitbar
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete