Getting Started - OpenFin
Testable allows you to load test your OpenFin application by simulating virtual users launching and using your application.
Because the OpenFin runtime is Chromium, Puppeteer is a great tool to choose for testing. This guide follows a basic example of running a sample OpenFin application with Puppeteer on Testable. All source code can be found at openfin-puppeteer-testable-example.
Start by signing up and creating a new test case using the Create Test button on the dashboard.
Enter the test case name (e.g. OpenFin Demo) and press Next.
Select Puppeteer as the scenario type.
Let’s use the following settings:
- Framework: Mocha
- Source: Version Control.
- Repository: Add New… use Url = https://github.com/testable/openfin-puppeteer-testable-example.git.
- Branch: master
- Advanced Settings => Browser Binary: OpenFin.
- Advanced Settings => OpenFin Config URL: app_sample.json.
The sample test spec captures a couple of screenshots which will be available as part of the test results.
Next, click on the Configuration tab or press the Next button at the bottom to move to the next step of configuring your test.
Now that we have the scenario for our test, we need to configure our load parameters including:
- Total Virtual Users: Number of users that will execute in parallel. Each user will execute the scenario (i.e. launch OpenFin and perform the test steps).
- Test Length: Select Iterations to have each client execute the scenario a set number of times regardless of how long it takes. Choose Duration if you want each client to continue executing the scenario for a set amount of time (in minutes).
- Location(s): Choose the location in which to run your test and the test runner source that indicates which test runners to use in that location to run the load test. For OpenFin tests, you will need to select either AWS On Demand - Testable Account or your own AWS account.
And that’s it! Press Start Test and watch the results start to flow in. See the new configuration guide for full details of all configuration options.
For the sake of this example, let’s use the following parameters:
Once the test starts executing, Testable will distribute the work out to the EC2 instances that Testable spins up.
In each region, the Testable runners runs the OpenFin test with 5 virtual users across 5 EC2 instances, each running the test 3 times with a 10 second pause between test iterations.
The results will include screenshots, assertions, traces, performance metrics, logging, breakdown by URL, analysis, comparison against previous test runs, and more.
That’s it! Go ahead and try these same steps with your own scripts and feel free to contact us with any questions.