Quality Testing

Quality is delighting customers

Hi all,

I am facing one issue in appium automation tool. 

In eclipse console i get the below mentioned issue 

at before method i used the below mentioned steps:

@BeforeMethod
public void setUp() throws Exception {


// set up appium
File appDir = new File("C:\\Users\\sudarshan\\Downloads\\Margin.apk");
File app = new File(appDir, "Margin.apk"); //my case “demo1.apk”
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("device","Android Emulator");

capabilities.setCapability("appium-version", "1.2.0.1");

capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability(CapabilityType.VERSION, "4.4.2");
capabilities.setCapability(CapabilityType.PLATFORM, "WINDOW");

capabilities.setCapability("deviceName", "AVD_for_4in_WVGA_Nexus_S");
//capabilities.setCapability("platformName", "Android 4.4");


capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("app-package", "com.techgene.margin"); //my case com.gorillalogic.monkeytalk.demo1
capabilities.setCapability("app-activity", ".MainActivity"); //my case RootActivity

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
}

when i run these i get below mentioned errors,


FAILED CONFIGURATION: @BeforeMethod setUp
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: platformName) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 153 milliseconds
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'TGSH-MB4-13', ip: '192.168.10.15', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at com.test.AppiumTest.setUp(AppiumTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

SKIPPED CONFIGURATION: @AfterMethod tear
SKIPPED: Calculate

===============================================
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================

[TestNG] Time taken by org.testng.reporters.XMLReporter@2b16b8: 22 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 20 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@19c2931: 44 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@1ce508a: 18 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@182d86: 156 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@1573872: 13 ms

Anyone can please help on these issue...:-)

Thanks in Advance.

Views: 430

Reply to This

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service