Running Appium typescript based framework in Appium Studio

Hi,

We have a typescript (Superset of Javascript) based automation framework written using native script-dev-appium plugin (To write .ts based tests instead of Appium javascript based .js tests). Tests are created in mocha test framework using the chai assertion library. Works quite well on both Android and IOS.

Our customer wanted to run these tests on Windows (For both Android and IOS). That is when we suggested Appium Studio to the customer. They were quite interested in knowing if the current framework could be run for both Android and IOS on a windows box. This is basically for developers to quickly run some tests on a windows box for both Android and IOS.

Can anyone please suggest as to how we can proceed for this evaluation with the community edition?

Note: We may not want to create the tests in Appium studio. We just need to run tests on both Android and IOS on a windows box and at the moment we are using Visual studio code to write typescript based Appium tests

@Tom, any suggestions?

Hi,

your scenario should be supported out of the box - the way to validate

  1. install appium studio community edition
  2. Run your tests from the windows PC

Appium Studio acts as an Appium Server, it means that every command which you can successfully preform on an standard appium server should also be applicable to an execution over appium studio

The server host + port on the above scenario will be http://localhost:4723 (same as the standard execution mode)

Hi @Tom,

Thanks a lot for reverting back.

Below, I’ve outlined the procedure that we’ve followed to create a typescript based framework.

  1. Using a plugin called nativescript-dev-appium (Under the hood, it’s appium). Just that it allows me to write the tests in typescript (Appium does not have any typescript language binding)
  2. Using Mocha to write the tests and chai assertion library for the assertions.
  3. Same tests/page objects work for both Android and IOS (Just that we sign the WDA for running the IOS tests on an actual hardware on mac)
    To run the tests, we simply use something like npm run e2e – --runType name ……….

I did contact the support team and was given some links to exporting the code (But everything seems to be Java). I want to have integration with Visual studio code and run the tests from VSCode. Couldn’t find any documentation for this. It’ll be great if you could point me to some resources that I can look upto to get such kind of a setup to run with Appium Studio.

Thanks

Hi,

Again, Appium Studio works in exactly the same way as for the standard appium server

it means that if you are able to run from VSCode on standard Appium, you’d be able to run from VSCode on Appium Server

you can try going through the article for some more info (or any other topic that’s related to Mocha \ Appium)

Hi @Tom,

Thanks. I already have the mocha tests up and running and also using VScode to write .ts based tests. This works on Windows as well.

Not really sure how to import this code into Appium studio and run the tests. I can do an npm run of the tests but how would it pick up Appium studio instead of appium(Just want the IOS tests to work on Windows) . Sorry if I’m missing something very obvious

Hi

Appium Studio should run on your machine prior to the execution of the tests
Appium Standard edition should not run on your PC

then the tests will get executed on the Appium Studio Server and not on the standard appium edition

Thanks @Tom. So in my existing setup I’ve installed appium globally (npm install -g appium). The plugin that I use automatically starts the appium server (https://github.com/NativeScript/nativescript-dev-appium). Not sure how I can by pass this and use the Appium Studio for the execution of the tests.

When I do a npm run e2e – -- …, it automatically starts the appium server that is installed globally.

Is there any Appium Studio Visual studio code integration available? Also do I need to set something in Appium Studio apart from adding the device? I just want to use my existing tests folder which also has desired capabilities defined in a .json file to trigger the tests via Appium studio instead of the appium that is installed globally

Thanks