Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Create a prototype for appium #1

Open
gunta opened this issue Aug 2, 2016 · 12 comments
Open

Create a prototype for appium #1

gunta opened this issue Aug 2, 2016 · 12 comments

Comments

@gunta
Copy link
Member

gunta commented Aug 2, 2016

Based on openstf/stf#387 (comment)

@gunta
Copy link
Member Author

gunta commented Aug 2, 2016

@bgericke do you think you'll be able to create a prototype for the steps you described?

I think for now a node.js based command line tool would suffice (we can think later about any UI integration).

@bgericke
Copy link

bgericke commented Aug 4, 2016

hey,
yes, I can implement this. Actually, I definately will, because I'm currently writing my bachelor thesis about this topic (Integrating an automated tests framwork into a remote test environment).

But there is one but:
I'm writing my thesis for a german automotive company and I'm not able to say if and when the code can be published (because primarily, rights on the code that is written here automatically belong to the company).
My team leader and me are definately willing to contribute to your project, but we have to check with our legal department first. We don't see, why they should say no to publishing the code. But as usual, I can predict, that german bureaucracy can take it's time :(
So I'm hoping that this is ok for you and I kindly ask you to be patient about this.

I will give you an update as soon as i know more.

@bgericke
Copy link

bgericke commented Aug 4, 2016

Okay, some things seem to go faster than I thought :D
My team leader cleared the issue. We can do this. So I'll create a prototype and upload the code to GitHub.

I think we can discuss the details from now on.

@gunta
Copy link
Member Author

gunta commented Aug 4, 2016

Ok that sounds amazing ;)
Let's keep discussing then.

@bgericke
Copy link

bgericke commented Aug 11, 2016

Hey, here are some things, I thought about:

  1. Our test developer writes his tests with TestNG. I would add some kind of module/functionality that hands over the needed parameters for the TestNG file to start the tests on the corresponding appium server instances.
  2. Also, i stumbled upon an issue with swagger-client and STF with SSL. I already created an issue for that.
  3. And for the prototype, I would just hand over some needed parameters, like:
    • List of device Serials as JSON
    • Path to test file as .jar
    • Auth token
    • An optional parameter with path to .apk file, so that the test can install the application if it's not yet installed

I think I can get the rest of the needed information from the STF API, as long as I have the device serial.

If you have any notes to the prototype, please let me know.

@bgericke
Copy link

Hey @gunta,
I want to give you a short update on the progress.

I have a first working Version, that can handle ADB connections to phones via STF (including all neede REST calls), start multiple Appium servers and start tests on them. Unfortunately the code is still quite dirty and needs some error handling.
Everything is based on promises and it's a command line tool. The command line tool takes the Auth token, the path to the testfile and JSON-array containing the phone serials, which need to be tested as parameters. All needed paths to Appium, ADB and Java are parsed from a config file.

I have implemented an extra module that starts tests via a .jar-file, which contain a TestNG test with an integrated customized Appium Client (this is what we use here), which gets some parameters from the phone and the port and address of the Appium server. I think we need to discuss, how we can make this part more generic in the future.

But at first, I have to finish my Bachelor Thesis, because the deadline is coming nearer. Before I hand it, i'll make some more tweaks on the software and a first prototype should be ready to go.

@yg0x01
Copy link

yg0x01 commented Oct 14, 2016

Sounds amazing :) . Thanks for this great works. When the code can be published ?

@sorccu
Copy link
Member

sorccu commented Oct 14, 2016

Note that there's https://github.com/openstf/stf-appium-example, which may or may not be enough for you.

@yg0x01
Copy link

yg0x01 commented Oct 14, 2016

OK, thanks @sorccu

@bgericke
Copy link

bgericke commented Oct 17, 2016

Okay, I think it's ready now. The code is working fine after some tests. I'll fork this repo here and make a PR.
I would highly appreciate any comments to changes in the code in order to make it better.

@gunta, @sorccu: Do you want me to comment the code in detail or are a few comments ok for you?

@bgericke
Copy link

I created a PR here, so we can discuss the implementation of the prototype.

Unfortunately I couldn't test the code on a Linux machine, but this should be done by friday.
But I think it should work out of the box. It is working well on Windows though.

@gunta
Copy link
Member Author

gunta commented Oct 27, 2016

@bgericke Thank you! We'll check it out as soon as we are able to find some time for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants