From 50d841b5d199d52fdf81c5f5d72261e4f2f7f6d4 Mon Sep 17 00:00:00 2001 From: Sergei Iartsev Date: Tue, 4 Jul 2023 19:16:44 +0300 Subject: [PATCH] docs(pricing): Docs updated with Pricing and Getting started --- docs/docs/cloud.md | 166 ----------------------------- docs/docs/cloud/getting-started.md | 145 +++++++++++++++++++++++++ docs/docs/cloud/overview.md | 26 +++++ docs/docs/cloud/pricing.md | 12 +++ docs/sidebars.js | 4 +- 5 files changed, 186 insertions(+), 167 deletions(-) delete mode 100644 docs/docs/cloud.md create mode 100644 docs/docs/cloud/getting-started.md create mode 100644 docs/docs/cloud/overview.md create mode 100644 docs/docs/cloud/pricing.md diff --git a/docs/docs/cloud.md b/docs/docs/cloud.md deleted file mode 100644 index a0268bab5..000000000 --- a/docs/docs/cloud.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: "Overview" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -[Marathon Cloud](https://marathonlabs.io/) is a cloud testing infrastructure built on top of the Marathon test runner. -It automatically provisions virtual devices to accommodate your tests within 15 minutes. -The test execution is then delegated to Marathon test runner, which handles tasks such as batching, -sorting, preventive retries, and post-factum retries. -This ensures an even distribution of tests across the provisioned devices. - -## Install - -The installation can be performed using [Homebrew](https://brew.sh/): -```shell -brew install malinskiy/tap/marathon-cloud -``` -Alternatively, you can download prebuilt binaries for Windows, Linux, or MacOS from [the Release page](https://github.com/MarathonLabs/marathon-cloud-cli/releases). - -## API Key - -Token creation and management are available at [the Tokens page](https://cloud.marathonlabs.io/tokens). Generate a token and save it somewhere safe for the next step. - -## Prepare bundles for testing - -### iOS - -Marathon Cloud supports tests written with **XCTest and XCUITest frameworks**. -Both the application and the tests must be built for the **ARM architecture**. - -Before initiating the testing process for your iOS application, you’ll need to create two `.app` bundles: one for the application that's being tested, and another for the tests themselves. Typically, `debug` variants are utilized for this purpose. - -Let's say our project is called "Sample". The code snippet below shows how to build the .app bundle: - -```shell -# file structure -# | -# |--home -# |--john -# |--sample <== you are here -# |--sample <== it's your application -# ... -# |--sample.xcodeproj - -xcodebuild build-for-testing \ - -project sample.xcodeproj \ - -scheme sample \ - -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \ - -derivedDataPath ./build -``` - -Note the relative paths of applications, as they will be required for running the tests. In the context of our example and `debug` build, these files can be located at the following paths: - -- Application: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sample.app` -- Test APK: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sampleUITests-Runner.app` - -One important thing to note is that `*.app` files are actually folders in disguise. To transfer them, it's necessary to convert these bundles into `.ipa` format or standard `zip` archives: - -```shell -# file structure -# | -# |--home -# |--john -# |--sample <== you are here -# |--build <== derivedData folder -# |--sample <== it's your application -# ... -# |--sample.xcodeproj -cd build/Build/Products/Debug-iphonesimulator -# convert to zip archive in this example -zip -r sample.zip sample.app -zip -r sampleUITests-Runner.zip sampleUITests-runner.app -``` - -Further, we will use these files: - -- Application: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sample.zip` -- Test APK: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sampleUITests-Runner.zip` - -### Android - -Marathon Cloud supports tests written with **UIAutomator, Cucumber, Espresso, and [Kaspresso](https://github.com/KasperskyLab/Kaspresso) frameworks**. - -Before initiating the testing process for your application, you’ll require two APK files: one for the application that’s being tested, and another for the tests themselves. Typically, `debug` variants are utilized for this purpose. - -If the primary application resides under the `app/` subproject, you can execute the following command to build both the app and test APK: - -```shell -# file structure -# | -# |--home -# |--john -# |--project <== you are here -# |--app <== it's your primary application -# ... -# |--build.gragle -# |--settings.gradle -./gradlew :app:assembleDebug :app:assembleDebugAndroidTest -``` - -Be sure to note the relative paths of the test APK and the app APK, as they will be required for running the tests. In the context of our example, involving the `app` project and the `debug` build, these files can be located at the following paths: - -- App APK: `/home/john/project/app/build/outputs/apk/debug/app-debug.apk` -- Test APK: `/home/john/project/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk` - - -## Samples (optional) - -To showcase the advantages of Marathon Cloud compared to other solutions, we've prepared a sample app with 300 tests, of which 15% are flaky. During the initial run, our platform will gather information about the tests. During the second run, it will optimize it to fit within 15 minutes. - - - -```shell -# Download the prebuilt iOS Application -curl https://cloud.marathonlabs.io/samples/ios/sample.zip -o sample.zip - -# Download the prebuilt iOS Test Application -curl https://cloud.marathonlabs.io/samples/ios/sampleUITests-Runner.zip -o sampleUITests-Runner.zip -``` - - - - -```shell -# Download the prebuilt Android Application -curl https://cloud.marathonlabs.io/samples/android/app.apk -o app.apk - -# Download the prebuilt Android Test Application -curl https://cloud.marathonlabs.io/samples/android/appTest.apk -o appTest.apk -``` - - - - -## Execution - -Now you can start running your tests. Use the following command to execute the CLI with the necessary parameters: - - - - -```shell -marathon-cloud \ - -api-key api_key \ - -app sample.zip \ - -testapp sampleUITests-Runner.zip \ - -platform iOS -``` - - - - -```shell -marathon-cloud \ - -api-key api_key \ - -app app.apk \ - -testapk appTest.apk \ - -platform Android -``` - - - - -For additional parameters, refer to the [marathon-cloud-cli README](https://github.com/MarathonLabs/marathon-cloud-cli/#installation). \ No newline at end of file diff --git a/docs/docs/cloud/getting-started.md b/docs/docs/cloud/getting-started.md new file mode 100644 index 000000000..9e457baee --- /dev/null +++ b/docs/docs/cloud/getting-started.md @@ -0,0 +1,145 @@ +--- +title: "Getting started" +--- + +## Prepare bundles for testing + +### Android + +Marathon Cloud supports tests written with **UIAutomator, Cucumber, Espresso, and [Kaspresso](https://github.com/KasperskyLab/Kaspresso) frameworks**. + +Before initiating the testing process for your application, you’ll require two APK files: one for the application that’s being tested, and another for the tests themselves. Typically, `debug` variants are utilized for this purpose. + +If the primary application resides under the `app/` subproject, you can execute the following command to build both the app and test APK: + +```shell +# file structure +# | +# |--home +# |--john +# |--project <== you are here +# |--app <== it's your primary application +# ... +# |--build.gragle +# |--settings.gradle +./gradlew :app:assembleDebug :app:assembleDebugAndroidTest +``` + +Be sure to note the relative paths of the test APK and the app APK, as they will be required for running the tests. In the context of our example, involving the `app` project and the `debug` build, these files can be located at the following paths: + +- App APK: `/home/john/project/app/build/outputs/apk/debug/app-debug.apk` +- Test APK: `/home/john/project/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk` + +### iOS + +Marathon Cloud supports tests written with **XCTest and XCUITest frameworks**. +Both the application and the tests must be built for the **ARM architecture**. + +Before initiating the testing process for your iOS application, you’ll need to create two `.app` bundles: one for the application that's being tested, and another for the tests themselves. Typically, `debug` variants are utilized for this purpose. + +Let's say our project is called "Sample". The code snippet below shows how to build the .app bundle: + +```shell +# file structure +# | +# |--home +# |--john +# |--sample <== you are here +# |--sample <== it's your application +# ... +# |--sample.xcodeproj + +xcodebuild build-for-testing \ + -project sample.xcodeproj \ + -scheme sample \ + -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \ + -derivedDataPath ./build + ``` + + Note the relative paths of applications, as they will be required for running the tests. In the context of our example and `debug` build, these files can be located at the following paths: + + - Application: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sample.app` + - Test APK: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sampleUITests-Runner.app` + + One important thing to note is that `*.app` files are actually folders in disguise. To transfer them, it's necessary to convert these bundles into `.ipa` format or standard `zip` archives: + + ```shell +# file structure +# | +# |--home +# |--john +# |--sample <== you are here +# |--build <== derivedData folder +# |--sample <== it's your application +# ... +# |--sample.xcodeproj + cd build/Build/Products/Debug-iphonesimulator +# convert to zip archive in this example + zip -r sample.zip sample.app + zip -r sampleUITests-Runner.zip sampleUITests-runner.app + ``` + + Further, we will use these files: + + - Application: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sample.zip` + - Test APK: `/home/john/sample/build/Build/Products/Debug-iphonesimulator/sampleUITests-Runner.zip` + + +## Samples (optional) + + To showcase the advantages of Marathon Cloud compared to other solutions, we've prepared a sample app with 300 tests, of which 15% are flaky. During the initial run, our platform will gather information about the tests. During the second run, it will optimize it to fit within 15 minutes. + + + + ```shell +# Download the prebuilt iOS Application + curl https://cloud.marathonlabs.io/samples/ios/sample.zip -o sample.zip + +# Download the prebuilt iOS Test Application + curl https://cloud.marathonlabs.io/samples/ios/sampleUITests-Runner.zip -o sampleUITests-Runner.zip + ``` + + + + + ```shell +# Download the prebuilt Android Application + curl https://cloud.marathonlabs.io/samples/android/app.apk -o app.apk + +# Download the prebuilt Android Test Application + curl https://cloud.marathonlabs.io/samples/android/appTest.apk -o appTest.apk + ``` + + + + +## Execution + + Now you can start running your tests. Use the following command to execute the CLI with the necessary parameters: + + + + + ```shell + marathon-cloud \ + -api-key api_key \ + -app sample.zip \ + -testapp sampleUITests-Runner.zip \ + -platform iOS + ``` + + + + + ```shell + marathon-cloud \ + -api-key api_key \ + -app app.apk \ + -testapk appTest.apk \ + -platform Android + ``` + + + + + For additional parameters, refer to the [marathon-cloud-cli README](https://github.com/MarathonLabs/marathon-cloud-cli/#installation). diff --git a/docs/docs/cloud/overview.md b/docs/docs/cloud/overview.md new file mode 100644 index 000000000..23a5f61c0 --- /dev/null +++ b/docs/docs/cloud/overview.md @@ -0,0 +1,26 @@ +--- +title: "Overview" +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +[Marathon Cloud](https://cloud.marathonlabs.io/) is a cloud testing infrastructure built on top of the Marathon test runner. +It automatically provisions virtual devices to accommodate your tests within 15 minutes. +The test execution is then delegated to Marathon test runner, which handles tasks such as batching, +sorting, preventive retries, and post-factum retries. +This ensures an even distribution of tests across the provisioned devices. + +## Install + +The installation can be performed using [Homebrew](https://brew.sh/): +```shell +brew install malinskiy/tap/marathon-cloud +``` +Alternatively, you can download prebuilt binaries for Windows, Linux, or MacOS from [the Release page](https://github.com/MarathonLabs/marathon-cloud-cli/releases). + +## API Key + +Token creation and management are available at [the Tokens page](https://cloud.marathonlabs.io/tokens). Generate a token and save it somewhere safe for the next step. + + diff --git a/docs/docs/cloud/pricing.md b/docs/docs/cloud/pricing.md new file mode 100644 index 000000000..41e27fe1b --- /dev/null +++ b/docs/docs/cloud/pricing.md @@ -0,0 +1,12 @@ +--- +title: "Pricing" +--- + +We operate on a Pay-As-You-Go model, meaning you only pay for the actual time spent running tests on our virtual devices. The pricing is set at a straightforward rate of $2 per hour for each virtual device. + +## Billing +To better understand this, picture having a test suite that requires 2 hours and 15 minutes (or 135 minutes) to run on one device. With Marathon Cloud, we automatically deploy an infrastructure of 9 virtual devices for you (135 minutes / 9 devices = 15 minutes). We then evenly distribute the tests among these devices, run them, and deliver the results to you within just 15 minutes. However, your tests will have used up 2 hours and 15 minutes (or 2.25 hours) of our device time in total. This means the cost of this test run for you would be $4.5. + +# Calculating Time per Device + +The computation of time for each device during a test run is based on the time span from the beginning of the first test on that device to the end of the last test on the same device. This means we don't factor in the device booting process or the application installation stage. We do, however, take into account the brief pauses between tests and the periodic device clean-ups that occur when using a batching strategy. Typically, pauses between tests take only fractions of a second, but clean-ups can require up to 6-8 seconds. diff --git a/docs/sidebars.js b/docs/sidebars.js index 9e13fd1aa..7c2a89d6f 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -74,7 +74,9 @@ const sidebars = { label: 'Cloud', collapsed: false, items: [ - 'cloud' + 'cloud/overview', + 'cloud/getting-started', + 'cloud/pricing' ] } ],