Test continuously and catch bugs early

Run automated tests and code analysis to detect issues early and deliver your end users a seamless experience.

What you can do with Codemagic

Static code analysis

Static code analysis

Assure the quality of your code by running Flutter’s code analysis tool or Dart Code Metrics. For more advanced use cases, Codemagic integrates with various enterprise-level tools like SonarCloud.

Run tests in the cloud, not locally

Run tests in the cloud, not locally

Focus on writing the code while the tests run in the cloud. Detect issues fast by automatically running unit tests on every commit and notifying the team of test failures via email, Slack, Teams or Discord.

Test different configurations

Test different configurations

Test your app for responsiveness, reliability and compatibility on a wide range of iOS and Android devices with Firebase Test Lab, AWS Device Farm, BrowserStack, LambdaTest, etc. Run integration tests in parallel or shard them for faster results.

Distribute to testers

Distribute to testers

Set up workflows to distribute successful builds to your QA team or beta testers. Create build dashboards to share new app versions internally or publish to TestFlight, Google Play or Firebase App Distribution.

Workflow Editor for quick setup

Static code analysis
Integration and unit tests
Test results
Static code analysis

Run static code analysis with your preferred tool

Integration and unit tests

Select which tests to run when your app is built

Test results

Get a quick overview of test results and code style issues right in your browser

Get even more from automated tests with codemagic.yaml

  • Summary of test results

    Generate a test report from the Flutter test command to get a quick summary of test results.

  • Code coverage report

    Get visibility into code coverage with Codecov or other similar tools.

  • Test on different platforms

    You can run your integration tests on iOS, Android and Web platforms.

  • Run tests on real devices

    Test your mobile app using Firebase Test Lab. You can find examples of how to use BrowserStack, LambdaTest, Kobiton, pCloudy, Katalon and other tools in https://docs.codemagic.io/.

  • workflows:
      sample-workflow:
        scripts:
          - name: Run unit tests
            script: flutter test --machine > test-results.json
            test_report: test-results.json
                        
  •  
    workflows:
      sample-workflow:
        scripts:
          - name: Run unit tests
            script: flutter test --coverage
          - name: Upload coverage report
            script: curl -s https://codecov.io/bash | bash -s -- -t $CODECOV_TOKEN -f $FCI_BUILD_DIR/coverage/lcov.info
                        
  • workflows:
      sample-workflow:
        scripts:
          - name: Run Android tests
            script: flutter test integration_test/foo_test.dart -d emulator-5554
          - name: Run iOS tests
            script: flutter test integration_test/foo_test.dart -d iPhone
          - name: Run web tests
            script: |
              chromedriver --port=4444 &
              flutter drive --driver=test_driver/integration_driver.dart --target=integration_test/app_test.dart -d chrome
                        
  • workflows:
      sample-workflow:
        scripts:
          - name: Activate Firebase account
            script: gcloud auth activate-service-account --key-file=/path/key.json --project=$PROJECT_ID
          - name: Run Android tests
            script: |
              gcloud firebase test android run \
                --type instrumentation \
                --app your-app.apk \
                --test your-app-test.apk \
                --device model=TestDevice1,version=AndroidVersion1  \
                --device model=TestDevice2,version=AndroidVersion2  \
                --environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" \
                --directories-to-pull /sdcard
                --timeout 3m
          - name: Run iOS tests
             script: |
               gcloud firebase test ios run \
                 --test PATH/TO/MyTests.zip \
                 --device model=MODEL_ID_1,version=VERSION_ID_1,locale=LOCALE_1,orientation=ORIENTATION_1 \
                 --device model=MODEL_ID_2,version=VERSION_ID_2,locale=LOCALE_2,orientation=ORIENTATION_2 \
                 --timeout 3m
                        

Continue your Codemagic discovery

See what else Codemagic can do for your continuous integration and continuous delivery needs.