Testing on the Dart track

Learn how to test your Dart exercises on Exercism


Choose your operating system:

Understanding Test Result

The test run summary will list the number of passed, skipped and failed tests. For example :

❯ dart test
00:01 +4 ~3 -1: Some tests failed.

+ describes the number of tests passed. In this example, 4 tests are passed.

~ describes the number of tests skipped. In this example, 3 tests are skipped.

- describes the number of tests failed. In this case, there is only one test that failed.

The skip parameter instructs the test suite to not run a test. This is commonly used to avoid running tests of unimplemented functionality, so you can focus on the part you are currently working on.

It is advised to enable tests one by one as you implement the functionality being tested or as you move towards edge cases. You can do so by flipping the skip: false to skip: true flag for each test. You can also submit your exercise without passing all tests to get feedback.


  1. Open a Command Prompt.

  2. Get the first exercise:

    C:\Users\JaneDoe>exercism fetch dart
    
    Not Submitted:     1 problem
    dart (Hello World) C:\Users\JaneDoe\exercism\dart\hello-world
    
    New:               1 problem
    dart (Hello World) C:\Users\JaneDoe\exercism\dart\hello-world
    
    unchanged: 0, updated: 0, new: 1
    
  3. Change directory into the exercism:

    C:\Users\JaneDoe>cd C:\Users\JaneDoe\exercism\dart\hello-world
    
  4. Download the dependent packages:

    C:\Users\JaneDoe>dart pub get
    
  5. Run the tests:

    C:\Users\JaneDoe>dart test
    

    (Don't worry about the tests failing, at first, this is how you begin each exercise.)

  6. Solve the exercise. Find and work through the instructions.md guide (view on GitHub).

Good luck! Have fun!

If you get stuck, at any point, don't forget to reach out for help.


  1. In the terminal window, get the first exercise:

    $ exercism fetch dart
    
    New:                 1 problem
    Dart (Etl) /Users/janedoe/exercism/dart/hello-world
    
    unchanged: 0, updated: 0, new: 1
    
  2. Change directory into the exercise:

    $ cd /Users/janedoe/exercism/dart/hello-world
    
  3. Download the dependent packages:

    $ dart pub get
    
  4. Run the tests:

    $ dart test
    

    (Don't worry about the tests failing, at first, this is how you begin each exercise.)

  5. Solve the exercise. Find and work through the instructions.md guide (view on GitHub).

Good luck! Have fun!

If you get stuck, at any point, don't forget to reach out for help.


  1. In the terminal window, get the first exercise:

    $ exercism fetch dart
    
    New:                 1 problem
    Dart (Etl) /home/janedoe/exercism/dart/hello-world
    
    unchanged: 0, updated: 0, new: 1
    
  2. Change directory into the exercise:

    $ cd /home/janedoe/exercism/dart/hello-world
    
  3. Download the dependent packages:

    $ dart pub get
    
  4. Run the tests:

    $ dart test
    

    (Don't worry about the tests failing, at first, this is how you begin each exercise.)

  5. Solve the exercise. Find and work through the instructions.md guide (view on GitHub).

Good luck! Have fun!

If you get stuck, at any point, don't forget to reach out for help.