Giter Site home page Giter Site logo

appiumtestdistribution / appiumtestdistribution Goto Github PK

View Code? Open in Web Editor NEW
979.0 87.0 363.0 111.87 MB

A tool for running android and iOS appium tests in parallel across devices... U like it STAR it !

Home Page: https://saikrishna321.github.io/

License: MIT License

Java 99.09% Gherkin 0.82% TypeScript 0.09%
parallel appium cucumber mp4box android automation testng appium-ios parallel-ios parallel-computing

appiumtestdistribution's Introduction


ATD


Appium Parallel Execution for Android and iOS on Real Devices

Open Source Love Join the chat at https://gitter.im/saikrishna321/AppiumTestDistribution CircleCI GitHub stars PRs Welcome GitHub forks

CircleCI

Thanks for support

ATD ATD

ATD

Add the below dependencies in your pom.xml (Master)

Please make sure you have installed Appium v2.0 and appium-device-farm plugin

<dependency>
    <groupId>com.github.AppiumTestDistribution</groupId>
    <artifactId>AppiumTestDistribution</artifactId>
    <version>latest_commit</version>
</dependency>
<repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
</repositories>
 <dependency>
   <groupId>com.github.saikrishna321</groupId>
   <artifactId>AppiumTestDistribution</artifactId>
   <version>13.1.0</version>
 </dependency>

ReportPortal

Add LISTENERS=com.epam.reportportal.testng.ReportPortalTestNGListener to config.properties to send data to report portal.

Sample Tests

Clone the project (https://github.com/saikrishna321/PageObjectPatternAppium) If your application is cross-platform and you end up building a PageObjectPattern Framework. Then you can also run those tests across Android and iOS devices connected to the same Mac OSX Host.

(e.g. If you have 3 Android and 3 iOS devices connected to the same machine, you will be able to execute these tests parallel on both platforms)

Video log Prerequisites

  • Install ffmpeg. OSX
    • $ brew update
    • $ brew install ffmpeg
    • `
  • Install ffmpeg. windows

Runner

Videos will be logged for failure tests
VIDEO_LOGS="true" mvn clean -Dtest=Runner test 

Credits

Thanks to

Parallel Run

ScreenShot

FAQ

Q. Can I automate application which I already have installed/downloaded from App store?

A. With XCUITest framework, that is available from iOS version 9.3, it's possible to execute Native (WebViews content would not be reachable) application using its bundle id.

In order to get information about bundle id of pre-installed application:

  • connect device with application installed;
  • run ideviceinstaller -l or ideviceinstaller -l -u {udid of the device} in case more than one device connected to the host;
  • in the list - find name of the application followed by its bundle id.

After that, instead of app capability bundleId should be used with application's bundle id as a value. Since Appium still needs WDA to be built and deployed on the real device - valid certificate and provisioning profile will be needed. More information could be found here

In case the tests need to interact with WebViews and/or iOS version has no support of XCUITest - Appium would need instruments application which is in debug mode. It will not work with any application which is not in debug mode. Read more about it here

Q. Does this framework support running multiple iOS simulators?

A. Yes, currently Appium does support multiple simulators with latest 1.6.6.beta with Xcode9-beta.

Q. Unable to instrument application or instruments crashed on start up?

A. Below are few possible causes

  • (app/ipa) is not on debug mode.
  • (app) targeted to simulator will not work with real device and vice versa
  • Check device's developer option in settings.

Q. Unable to install application during automation?

A. A quick solution would be to try to install the application using "ideviceinstaller -i ipa_name". If that does not work, check app is built with a valid provisioning profile.

Q. Can I run tests on iOS app for which I have source code(e.g:"Wordpress") on real devices?

A. Yes, with a valid provisioning profile, this app can be installed on your device. (Note: The application must be signed with a valid developer certificate and your device should be added to the provisioning profile)

Organizations 💙

ThoughtWorks CeX Travelstart
ThoughtWorks Cex Travelstart
Jio India M800 Reward Gateway
Jio M800 Reward
dahmakan

License

AppiumTestDistribution is released under License: MIT

Copyright (c) 2023 AppiumTestDistribution

appiumtestdistribution's People

Contributors

anandbagmar avatar anilpatidar avatar azure-pipelines[bot] avatar brtu avatar dependabot-preview[bot] avatar dependabot[bot] avatar gitter-badger avatar hariharanweb avatar kiethen avatar nwintop avatar pr4bh4sh avatar priyankshah217 avatar rakshitars avatar ratkod avatar rogermorgado avatar saikrishna321 avatar shamaugale avatar shridharkalagi avatar shrikarvk avatar srinivasantarget avatar sudhihathwar avatar sumitbera avatar suratdas avatar sushanthn22 avatar thote avatar thotegowda avatar vinayakamayura avatar vmaramreddy2 avatar vpazzini avatar wasiqb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appiumtestdistribution's Issues

Need testcase step logs for manual qa to identify an issue and before reporting it as an issue manually test it in application, also need some modification in report

Hi Sai, Can you please add below points in your framework

(1) It would be great along with "AppiumServerLogs" and "AdbLogs" if there would be "testCaseStepsLogs" (using log4j logs) for manual QA to identify the issue looking at the testcase steps and before reporting it as an issue they can give it a try using steps log manually in application
Example :
Enter username
Enter password
click on sign in button
wait for welcome page to load

(2) In Extend report what i have noticed is when test case failed it doesn't display the name of failed test case, like in below screenshot LoginTest failed all 4 test but there is no name of testcase (hightailed in red)

screen shot 2016-01-15 at 12 07 58 pm

(3) In below screenshot there are total 4 test in LoginTest but it doesn't says how many test cases "LoginTest" has among how many passed and how many failed (hightailed in red)

screen shot 2016-01-15 at 12 11 38 pm

Thanks
VInit

Run the PageObjectPatternAppium demo issue

hi saikrishna, when i use the demo for PatternAppium, i get some issue,i don't know why. can you give me some help on it?

T E S T S
-------------------------------------------------------
Running com.appium.tests.Runner
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@2a098129
creating directory: Logs
creating directory: ADBLogs
Android 192.168.99.102:5555 Directory is created!
Android 192.168.99.101:5555 Directory is created!
java.io.IOException: Cannot run program "idevice_id": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:450)
    at java.lang.Runtime.exec(Runtime.java:347)
    at com.appium.utils.CommandPrompt.runCommand(CommandPrompt.java:21)
    at com.appium.ios.IOSDeviceConfiguration.getIOSUDID(IOSDeviceConfiguration.java:37)
    at com.appium.manager.ParallelThread.runner(ParallelThread.java:61)
    at com.appium.tests.Runner.testRunner(Runner.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    at org.testng.TestRunner.privateRun(TestRunner.java:782)
    at org.testng.TestRunner.run(TestRunner.java:632)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 40 more
Total Number of devices detected::2

can i use this tools for appium grid ?

@saikrishna321
Hi, buddy.
i want to run the test on different PC, Most of the solution is that use selenium grid and support the parallel processing testing framework. Does this repo support use the selenium grid to run the test on different node?

Implement ExtentX reporting for the test results

Hey @saikrishna321,

I have 4 nodes which are executing tests using the AppiumTestDistribution framework, and the problem is that I get 4 separate reports from the nodes. The idea is to implement ExtentX reporting, because it's really easy to setup ExtentX server with MongoDB and that all 4 nodes are sending the results to the DB and that way we'll have single place for analysing the test results and we'll have test's history and trending graphs.

Create a Ignore annotation with value android and iOS

When running in parallel/distributed mode concurrently for both android and iOS at the same time, if a specific Test needs to be ignored for android/iOS

@IgnoreTest(value=android)
@Test
public void checkoutTest(){
...This method should be ignored running on android as its not implemented and should trigger in iOS
}

@SrinivasanTarget @jaydeepc thoughts?

Parallel Testing support for CI

Hey @saikrishna321, I'm currently looking into your framework and trying to find a way to integrate the parallel testing for Android with the CI to increase the efficiently in delivery pipeline of the product. Or i'm even thinking of running a local server in the office to make this happen.

Before i start going through the framework, i just wanted to check if you have any ideas or implementations already that i may have missed.

Implement the passing of the noReset flag when creating the driver

Currently, the framework resets the app before every test which make impossible to test some scenarios for features like, intro screen is presented only once at first login, or scenario where email filed value is preserved after logout and on next start. One option is to pass the noReset flag to the driver at creation time so the app is not reseted.

Can this be done?

Getting "java.io.IOException: Cannot run program "adb": error=2, No such file or directory"

Hi Sai, Thanks for sharing this awesome parallel execution solution however when i tried to run your project on Mac OS i am getting "java.io.IOException: Cannot run program "adb": error=2, No such file or directory" on "adb" command run thru Java program, can you please provide some solution so i can give it a try and apply this same login in my work project.

Note : When i try to run project thru maven command in terminal i don't get any error but when i try to run it in eclipse for debug purpose i am getting above error.

Thanks
Vinit

iOS hybrid apps web element doesn't trigger once switched from Native to Webview using webkit proxy server

Hi Sai, It's been last 2 days i have been trying to find out the root cause of why am i not able to click, send keys etc of web element once switched from Native to web view and i noticed that something that you need to modify in your framework for hybrid iOS apps web part to work.

When i commented out iOS Webkit proxy part from framework and manually started iOS wekitkit proxy server using below command i been able to access web element (if it is click event it clicked on web element).

ios_webkit_debug_proxy -c 1fb95ac900359617add8ffbb41dfdba33668e2a9:27753

Note: Before closing the issue please give it try because i tried all possibilities and after commented iOS webkit proxy part from your FW, web element started working

Thanks
Vinit

[Issue] in version 4.0.2 from maven dependency, class 'AndroidDeviceConfiguration' no method "removeApkFromDevices"

Hi Sai,
I updated AppiumTestDistribution from 4.0.1 to 4.0.2 in my test project's POM.xml, but after downloaded 4.0.2 jar, get error and message is class AndroidDeviceConfiguration without method removeApkFromDevices.

I checkout AppiumTestDistribution source code from Github and found that method removeApkFromDevices was existed in class AndroidDeviceConfiguration.

could you advise what is the problem?

Json should be rendered in the right format to fetch for debug report

var jsondata = { "device" : [
    {
      "DeviceName": "GoogleNexus6500API211440x2560",
      "Device Model": "generic",
      "Screen Name": "TestMethod1",
      "ImagePath": [
        {

        "Image":"android/192_168_60_102_5555/GoogleNexus6500API211440x2560_generic/GoogleNexus6500API211440x2560_generic_TestMethod11_results.png"} ,
          {
        "Image" :"android/192_168_60_102_5555/GoogleNexus6500API211440x2560_generic/GoogleNexus6500API211440x2560_generic_TestMethod1_results.png" },
          {         
        "Image" :"android/192_168_60_102_5555/GoogleNexus6500API211440x2560_generic/GoogleNexus6500API211440x2560_generic_TestMethod2_results.png"

                    }]
    },
     {
      "DeviceName": "GoogleNexus4500API21768x1280",
      "DeviceModel": "generic",
      "Screen Name": "TestMethod1",
     "ImagePath": [
     {
      "Image":"android/192_168_60_103_5555/GoogleNexus4500API21768x1280_generic/cutout-nexus-5.png"},
                   {
       "Image" :"android/192_168_60_103_5555/GoogleNexus4500API21768x1280_generic/GoogleNexus4500API21768x1280_generic_TestMethod1_results.png"

    }]
          }]
  };

How to distribute all the @Test methods from all classes across all connected devices in parallel ?

I tried to execute @test method thru "parallel" and "distribute" both works the way it was implemented however for distribute instead of distributing per class can we distribute per @test method

Lets say i have 2 class each are having total 6 @test method ( class 1 with 6 @test method and class 2 with 6 @test method) so total 12 @test method are available to execute on lets say 3 connected android devices but i wanna execute all these 12 @test method parallel means if the 1st device took one @test method it should not execute on other connected devices, as soon as device finished executing @test method it should start execute one on pipeline (waiting) and this way all 3 devices continue executing until there is no @test method left to be execute in pipeline (waiting).

Long story short what i want is all the @test methods from all classes to get distributed across connected devices ?

Note : the project i work on we have this requirement to follow, if you can please help Sai, i really appreciated if there is any workaround you can provide me for above.

Thanks
Vinit

Parent child relationship is NOT getting maintained when there is a Retry with Test method

Hi Sai, This issue is similar to "#22" (Thank you so much for the enhancement you have made for this issue) but instead of reopening closed issue i have created new one,

i have noticed with Retry it is not grouping in same test method, PFB screenshot in which you can see there are 2 methods among one pass and one failed, failed one has Retry on it "InvalidSearchKeyword" which is not grouping in "InvalidSearchKeyword"

screen shot 2016-03-16 at 3 28 31 pm

Thanks
Vinit

Can you give control to user to turn on/off text file appiumlogs since it is breaking execution

For Windows 8,
Error: EPERM: operation not permitted, stat 'C:\Users\Qapitol QA\IdeaProjects\flipkartSampleWithoutPageObjectMaven\target\appiumlogs\0123456789ABCDEF__validLoginTest.txt'
at Error (native)

Can't delete the file manually also even though we have admin access. The only way to delete file is by sign-out from the system and log-in again.

Current file permission are:
-rw-r--r--

suggested solution:

case 1:

while re-executing the same test why not create a separate file with "unique test name + datetime" for logs instead of trying to access same file for overwriting/appending?

case 2: (my preferred suggestion is to add this feature and give control to user)

can you give a control to user via config.properties file variable to either turn on/off the logs based on our wish? If we can turn off the "appiumlogs" then at-least test execution would not be block

Parallel testing support for iOS

hey, thanks for the cool framework.

i just noticed that in AppiumParallelTest class, when the property for "APP_TYPE" is native, it sets a capabilities to android.

Are there any ways to parellely distribute iOS testings also? or do i have to manually set an ios setup like one in your sample?

thanks!

Execution is blocked due to java.lang.NumberFormatException: For input string: ""

In Windows 8,
For the first time execution the "extent.xml" file doesn't exist, then following warning is encountered and execution is stopped.

Jun 15, 2016 5:40:58 PM com.relevantcodes.extentreports.ExtentReports loadConfig
WARNING: Unable to perform report configuration. The file C:\Users\Qapitol QA\IdeaProjects\flipkartSampleWithoutPageObjectMaven\extent.xml was not found.

java.lang.NumberFormatException: For input string: ""

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)

Screenshot: http://screencast.com/t/umFG3eIX3O

Solution suggested:

case 1:

Give control to user to turn for extent report to enable/disable via config.properties file

case 2:

Can we get the fix for:
java.lang.NumberFormatException: For input string: ""

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)

This issue is noted when multiple devices are connected.

[Suggestion] Add test step in ExtentReports

Dear sir,
Thanks provide such wonderful integration tools and shared it.

In my integration roadmap of Appium, I also use TestNG, ExtentReport, also image tool SikuliX, and YAML to manage the page object (reduce the hard code in test script).

I would like to know, whether you can add test step information into ExtentReports, not just @BeforeClass, @BeforeMethod, @AfterMethod, @AfterClass message in appium server start and appium quit.

For example, in test, in Login page, click page object Submit button, we can also record the test operation information into ExtentReport, such like:

Click: Login --> [Submit] button

and how to store the description of test operation, maybe we can extend WebElement and add a field to store the description, such like:

ExtWebElement:
  - WebElement
  - Description

any advise?

BTW, how I can get the ExtentTest instance in @Test?

Not able to run project from eclipse even after setting ANDROID_HOME variable in runner.java class

Hi Sai, Can you please help here, I am trying to make some modification in your sample test for debugging purpose in eclipse but even after setting ANDROID_HOME variable in runner.java class, i am not able to run from eclipse.

In Below screenshot you can see i have added "ANDROID_HOME" variable in runner.java class

screen shot 2016-01-19 at 1 48 47 pm

In below screenshot you can see i am trying to run project from eclipse using runner.java class as testng project

screen shot 2016-01-19 at 1 49 42 pm

In below screenshot you can see the run logs, i have highlighted error msg.

screen shot 2016-01-19 at 1 55 43 pm

Below is the log from Terminal where i am successfully be able to run this project without any errors

ushofml916k:PageObjectPatternAppium vsandes$ mvn clean -Dtest=Runner test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PagePatternAppium 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ PagePatternAppium ---
[INFO] Deleting /Users/vsandes/Desktop/searsAndroid_Apps/PageObjectPatternAppium/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ PagePatternAppium ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ PagePatternAppium ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ PagePatternAppium ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ PagePatternAppium ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 24 source files to /Users/vsandes/Desktop/searsAndroid_Apps/PageObjectPatternAppium/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ PagePatternAppium ---
[INFO] Surefire report directory: /Users/vsandes/Desktop/searsAndroid_Apps/PageObjectPatternAppium/target/surefire-reports


T E S T S

Running com.appium.tests.Runner
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@8807e25
creating directory: Logs
DIR created
creating directory: ADBLogs
DIR created
adb service already started
Following device is connected
e9739647 samsung SM-G900P 4.4.2

Total Number of devices detected::1
starting running tests in threads
forEach: true
forEach: true
forEach: true
forEach: true
Running test file: com.appium.tests.AddCommentTest
Into TestNGRunner
[TestNG] Running:
Command line suite

adb service already started
********pool-1-thread-1
***
Running Test in Distributed Way
1
Starting Appium Server
e9739647
info: Welcome to Appium v1.4.8 (REV c8179bd8352d3c62d98fa58b324491230df9342a)
info: Appium REST http interface listener started on 0.0.0.0:55457
info: Console LogLevel: info
info: File LogLevel: info
info: --> GET /wd/hub/status {}
info: <-- GET /wd/hub/status 200 8.517 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: --> GET /wd/hub/status {}
true
io.appium.java_client.service.local.AppiumServiceBuilder@2267791f
info: <-- GET /wd/hub/status 200 3.014 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/vsandes/Desktop/Appium/PageObjectPatternAppium/build/wordpress.apk","appPackage":"org.wordpress.android","appActivity":"org.wordpress.android.ui.WPLaunchActivity","platformVersion":"5.X","appWaitActivity":"org.wordpress.android.ui.accounts.SignInActivity","platformName":"Android","deviceName":"Android"}}
info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: Starting android appium
info: Java version is: 1.8.0_25
info: Retrieving device
info: Found device e9739647
info: Device API level is: 19
info: App is already installed, resetting app
info: Starting App
info: <-- POST /wd/hub/session 303 13959.549 ms - 74
info: --> GET /wd/hub/session/a9530ce2-63fe-4847-9d9f-642eb4cb123c {}
info: <-- GET /wd/hub/session/a9530ce2-63fe-4847-9d9f-642eb4cb123c 200 3.117 ms - 942 {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.4.2","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"/Users/vsandes/Desktop/Appium/PageObjectPatternAppium/build/wordpress.apk","appPackage":"org.wordpress.android","appActivity":"org.wordpress.android.ui.WPLaunchActivity","platformVersion":"5.X","appWaitActivity":"org.wordpress.android.ui.accounts.SignInActivity","platformName":"Android","deviceName":"Android"},"app":"/Users/vsandes/Desktop/Appium/PageObjectPatternAppium/build/wordpress.apk","appPackage":"org.wordpress.android","appActivity":"org.wordpress.android.ui.WPLaunchActivity","appWaitActivity":"org.wordpress.android.ui.accounts.SignInActivity","platformName":"Android","deviceName":"e9739647"},"sessionId":"a9530ce2-63fe-4847-9d9f-642eb4cb123c"}
/Users/vsandes/Desktop/searsAndroid_Apps/PageObjectPatternAppium
Jan 19, 2016 1:24:32 PM com.relevantcodes.extentreports.Configuration
INFO: Configurating report from file:/Users/vsandes/.m2/repository/com/relevantcodes/extentreports/2.40/extentreports-2.40.jar!/com/relevantcodes/extentreports/resources/extent-config.xml

Thanks
Vinit

Switching from Native to WebView, test hangs and logcat should not be captured when tests in switched to chromedriver

Hi Sai, After upgrading framework i am seeing an issue in extentReport, PFB screenshot with comment added in. I have added Retry with Test method which is causing below issue, if i remove Retry and run i don't see an issue.

screen shot 2016-02-07 at 7 40 05 pm

screen shot 2016-02-07 at 7 40 38 pm

screen shot 2016-02-07 at 7 40 49 pm

In below list of screenshot you can see extentReport generating as expected but this is without using Retry with Test method. Retry with Test method cause an issue mentioned in above listed screenshot

screen shot 2016-02-07 at 7 56 40 pm

screen shot 2016-02-07 at 7 56 48 pm

screen shot 2016-02-07 at 7 56 59 pm

Thanks
Vinit

Handling Multiple User credentials when tests in parallel

@saikrishna321 can you please clarify parallel execution approach in app like gmail , where I launch browser on each of the devices with same id and do actions like creating mail , deleting etc.

how do you make sure each of the action is thread safe and don't mingle with others

Thanks in advance.

How to enable Extent reporting

HI Sai,

I was able to run the tests in parallel on two emulators but I donot see any report generated.
How to enable reporting?

Also if I run the tests in distributed mode the tests are running on only one device.Is there any thing I missed.

Thanks,
Rajendra

All test methods under class in report doesn't look good, need something like when you click on test method it expand and collapse

Hi Sai, Can you please make the modification in your framework for the extentReport, rightnow in report when you click on Class name it shows all the Test method in one go (including pass, fail, appium log, failure reason, and screenshot).

In below Screenshot you can see Class which ran on device which has been assigned under the device category as expected and looks good

screen shot 2016-03-12 at 10 15 55 pm

In below screenshot you can see when you click on class name it shows all the test methods including all the details which doesn't looks good, instead if you can make it like a way when you click on Class name it gives all the Test method and when you click on Test method it expand with result like Logs, screenshot, StackTrace etc.

alltest

If it can be change as below which looks neat and clean to the end user.

screen shot 2016-03-12 at 10 33 23 pm

screen shot 2016-03-12 at 10 39 10 pm

Thanks
Vinit

Regarding extentReport in your awesome framework

Hi Sai, extentReport Api has already parent child relationship between test suite and test cases, can you please add this enhancement in your framework like below i have shown in diagram. One of the sample provided by Anshoo (extentReport Dev) which has this parent child relationship. Your framework is really helping out if the report can be improved it will be like your feeding the needy people.

screen shot 2016-01-26 at 3 09 09 pm

Thanks
Vinit

testcase retry before deciding it's an application issue

Hi Sai, Can you please add "retry" on test method (max 3 times) before considering it's an actual application issue. What i mean to say is lets say LoginTest has test method "loginWithValidUser()" which started executing and some reason it failed (not due to an application issue) lets say network issue so that's not an application issue in this case it should execute same test "loginWithValidUser()" again, if it pass on 2nd try it should not go for 3rd try but if it fails on 2nd try so 3rd try will be the last one and then it will be consider that even after trying same scenario 3 times it is still failing it means it's an application issue and Dev has to fix it.

Thanks
Vinit

Screenshots not shown in ExtentReport

There is a bug with the links to the screenshots in the extentreport. The problem is that the timestamp is not concatenated to the screenshot filename. Screenshots are taken and in folder, but the links to them are wrong.

screen-shot-2016-06-13-at-08 25 00

screen-shot-2016-06-13-at-08 33 27

screen-shot-2016-06-13-at-08 35 08

While switching the context to webview from native, execution at some line taking forever until it manually killed

Sai, There are multiple issues i have found with this iOS webkit proxy server with any port assigned, Please find them all below with logs and screenshot.

(1) Issue 1 :

  • Execution is getting stuck and taking forever until it manually killed on " driver.context(contextName);" once it found web view and going to switch the context from native to web view

Appium server log :
Issue1.txt

Screenshot :
issue1

(2) Issue 2

  • Execution is getting stuck and taking forever until it manually killed on " Set contextNames = driver.getContextHandles();" while collecting all context for the page.

Appium server log :
Issue2.txt

Screenshot :
issue2

PFB screenshot of Activity monitor in which you can see "iOS_webkit_proxy_server" is running.

screen shot 2016-04-03 at 2 26 13 am

Thanks
Vinit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.