Pushing data into my application in automation testing





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I automate android application and I need automation tool that can push data into started activity in my tests (by Intent or somehow else). I tried appium but it can only start new activity with intent action which registered in Manifest.
Are there any such tools at all? Or maybe other way to do this










share|improve this question































    0















    I automate android application and I need automation tool that can push data into started activity in my tests (by Intent or somehow else). I tried appium but it can only start new activity with intent action which registered in Manifest.
    Are there any such tools at all? Or maybe other way to do this










    share|improve this question



























      0












      0








      0








      I automate android application and I need automation tool that can push data into started activity in my tests (by Intent or somehow else). I tried appium but it can only start new activity with intent action which registered in Manifest.
      Are there any such tools at all? Or maybe other way to do this










      share|improve this question
















      I automate android application and I need automation tool that can push data into started activity in my tests (by Intent or somehow else). I tried appium but it can only start new activity with intent action which registered in Manifest.
      Are there any such tools at all? Or maybe other way to do this







      android automation automated-tests






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 18:23









      Fantômas

      32.9k156491




      32.9k156491










      asked Nov 23 '18 at 15:52









      Alexey ZarankaAlexey Zaranka

      13




      13
























          2 Answers
          2






          active

          oldest

          votes


















          0














          You can write a simple Android app/service without any UI elements, which can pass the required data via intent or some other means you wanted. This android app/service should be designed in such a way that you can invoke the required functionality via adb cmds. For example your app can continuously read a file , which you can push via adb. Define your own cmds and write those cmds in the file. push the file to android device via adb. your app can read this file, extract the cmd and invoke required method to share the data to another app.



          Let say SEND_DATA is the cmd defined to share the data with the another android app



          From PC:



          echo SEND_DATA > cmd.txt
          adb push cmd.txt /SomewhereInAndroidDevice


          From Your Android App:



          loop
          {
          if /SomewhereInAndroidDevice/cmd.txt:
          read /SomewhereInAndroidDevice/cmd.txt;
          if(cmd == SEND_DATA)
          call required method to send data to another APP;
          deleate /SomewhereInAndroidDevice/cmd.txt;
          }





          share|improve this answer


























          • Thanks for the proposed solution! I will definitely try to implement it as an alternative)

            – Alexey Zaranka
            Dec 17 '18 at 11:27



















          0














          I found a solution in BroadcastReceiver. You can create it in the main activity and wait for the custom intent, which is sent via ADB using Appium. Thus, I was able to change the data application runtime






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53449641%2fpushing-data-into-my-application-in-automation-testing%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can write a simple Android app/service without any UI elements, which can pass the required data via intent or some other means you wanted. This android app/service should be designed in such a way that you can invoke the required functionality via adb cmds. For example your app can continuously read a file , which you can push via adb. Define your own cmds and write those cmds in the file. push the file to android device via adb. your app can read this file, extract the cmd and invoke required method to share the data to another app.



            Let say SEND_DATA is the cmd defined to share the data with the another android app



            From PC:



            echo SEND_DATA > cmd.txt
            adb push cmd.txt /SomewhereInAndroidDevice


            From Your Android App:



            loop
            {
            if /SomewhereInAndroidDevice/cmd.txt:
            read /SomewhereInAndroidDevice/cmd.txt;
            if(cmd == SEND_DATA)
            call required method to send data to another APP;
            deleate /SomewhereInAndroidDevice/cmd.txt;
            }





            share|improve this answer


























            • Thanks for the proposed solution! I will definitely try to implement it as an alternative)

              – Alexey Zaranka
              Dec 17 '18 at 11:27
















            0














            You can write a simple Android app/service without any UI elements, which can pass the required data via intent or some other means you wanted. This android app/service should be designed in such a way that you can invoke the required functionality via adb cmds. For example your app can continuously read a file , which you can push via adb. Define your own cmds and write those cmds in the file. push the file to android device via adb. your app can read this file, extract the cmd and invoke required method to share the data to another app.



            Let say SEND_DATA is the cmd defined to share the data with the another android app



            From PC:



            echo SEND_DATA > cmd.txt
            adb push cmd.txt /SomewhereInAndroidDevice


            From Your Android App:



            loop
            {
            if /SomewhereInAndroidDevice/cmd.txt:
            read /SomewhereInAndroidDevice/cmd.txt;
            if(cmd == SEND_DATA)
            call required method to send data to another APP;
            deleate /SomewhereInAndroidDevice/cmd.txt;
            }





            share|improve this answer


























            • Thanks for the proposed solution! I will definitely try to implement it as an alternative)

              – Alexey Zaranka
              Dec 17 '18 at 11:27














            0












            0








            0







            You can write a simple Android app/service without any UI elements, which can pass the required data via intent or some other means you wanted. This android app/service should be designed in such a way that you can invoke the required functionality via adb cmds. For example your app can continuously read a file , which you can push via adb. Define your own cmds and write those cmds in the file. push the file to android device via adb. your app can read this file, extract the cmd and invoke required method to share the data to another app.



            Let say SEND_DATA is the cmd defined to share the data with the another android app



            From PC:



            echo SEND_DATA > cmd.txt
            adb push cmd.txt /SomewhereInAndroidDevice


            From Your Android App:



            loop
            {
            if /SomewhereInAndroidDevice/cmd.txt:
            read /SomewhereInAndroidDevice/cmd.txt;
            if(cmd == SEND_DATA)
            call required method to send data to another APP;
            deleate /SomewhereInAndroidDevice/cmd.txt;
            }





            share|improve this answer















            You can write a simple Android app/service without any UI elements, which can pass the required data via intent or some other means you wanted. This android app/service should be designed in such a way that you can invoke the required functionality via adb cmds. For example your app can continuously read a file , which you can push via adb. Define your own cmds and write those cmds in the file. push the file to android device via adb. your app can read this file, extract the cmd and invoke required method to share the data to another app.



            Let say SEND_DATA is the cmd defined to share the data with the another android app



            From PC:



            echo SEND_DATA > cmd.txt
            adb push cmd.txt /SomewhereInAndroidDevice


            From Your Android App:



            loop
            {
            if /SomewhereInAndroidDevice/cmd.txt:
            read /SomewhereInAndroidDevice/cmd.txt;
            if(cmd == SEND_DATA)
            call required method to send data to another APP;
            deleate /SomewhereInAndroidDevice/cmd.txt;
            }






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 5 '18 at 12:48

























            answered Dec 5 '18 at 12:43









            Nithin PNithin P

            378215




            378215













            • Thanks for the proposed solution! I will definitely try to implement it as an alternative)

              – Alexey Zaranka
              Dec 17 '18 at 11:27



















            • Thanks for the proposed solution! I will definitely try to implement it as an alternative)

              – Alexey Zaranka
              Dec 17 '18 at 11:27

















            Thanks for the proposed solution! I will definitely try to implement it as an alternative)

            – Alexey Zaranka
            Dec 17 '18 at 11:27





            Thanks for the proposed solution! I will definitely try to implement it as an alternative)

            – Alexey Zaranka
            Dec 17 '18 at 11:27













            0














            I found a solution in BroadcastReceiver. You can create it in the main activity and wait for the custom intent, which is sent via ADB using Appium. Thus, I was able to change the data application runtime






            share|improve this answer




























              0














              I found a solution in BroadcastReceiver. You can create it in the main activity and wait for the custom intent, which is sent via ADB using Appium. Thus, I was able to change the data application runtime






              share|improve this answer


























                0












                0








                0







                I found a solution in BroadcastReceiver. You can create it in the main activity and wait for the custom intent, which is sent via ADB using Appium. Thus, I was able to change the data application runtime






                share|improve this answer













                I found a solution in BroadcastReceiver. You can create it in the main activity and wait for the custom intent, which is sent via ADB using Appium. Thus, I was able to change the data application runtime







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 17 '18 at 11:30









                Alexey ZarankaAlexey Zaranka

                13




                13






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53449641%2fpushing-data-into-my-application-in-automation-testing%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy