Skip to content

Conversation

@dustinlessard-wf
Copy link

FOR YOUR CONSIDERATION

While developing, I like to run the individual test-file that I'm focussed on. This proposed change allows us to run one or more specific test-files.

Example with single test file:

ddev test path/to/tests/my_test.dart

Example with multiple test files:

ddev test path/to/tests/my_test.dart path/to/tests/another_test.dart

Example with integration + specific unit test file(s):

ddev test --integration path/to/tests/my_test.dart path/to/tests/another_test.dart

Preserved Functionality

Example with integration tests :

ddev test --integration

Example with unit-tests :

ddev test --unit

ddev test

Example with running unit + integration tests :

ddev test --unit --integration

Still need:

  • - integration test

Required:
@trentgrover-wf @evanweible-wf @maxwellpeterson-wf @jayudey-wf

FYI:

@jayudey-wf
Copy link
Contributor

you're not really able to run a single test with this pr though, just a single test file right?

@dustinlessard-wf dustinlessard-wf changed the title Individual tests Individual test files Oct 30, 2015
@dustinlessard-wf
Copy link
Author

Good point @jayudey-wf , I changed the title/description to match.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to keep this print stmt?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, removed.

@trentgrover-wf
Copy link
Contributor

smithy fails because of some dart format issues
+1 to the code and concept, but should get a test in here

@evanweible-wf
Copy link
Contributor

Currently if you run ddev test, the unit test suite runs by default since the --unit flag defaults to true. Is that still the case here?

@dustinlessard-wf
Copy link
Author

@evanweible-wf , yes that functionality is preserved though in the code but it's not as straightforward as before.

Now, we will run the unit-tests if --unit is included or
(when no individual test files are specified + --integration is not specified + --unit is not specified).

@evanweible-wf
Copy link
Contributor

@dustinlessard-wf cool, that works for me.

@codecov-io
Copy link

Current coverage is 48.05%

Merging #85 into master will not affect coverage as of b6c5849

Powered by Codecov. Updated on successful CI builds.

@maxwellpeterson-wf
Copy link
Member

+1

@trentgrover-wf
Copy link
Contributor

+1
@jayudey-wf ready for merge

@jayudey-wf
Copy link
Contributor

@dustinlessard-wf do you want to update the readme for this change?

@dustinlessard-wf
Copy link
Author

Good point @jayudey-wf - will do.

@trentgrover-wf
Copy link
Contributor

+1

1 similar comment
@evanweible-wf
Copy link
Contributor

+1

@jayudey-wf jayudey-wf changed the title Individual test files Allow individual test files Nov 3, 2015
@jayudey-wf jayudey-wf changed the title Allow individual test files CP-1091 Allow individual test files Nov 3, 2015
@jayudey-wf
Copy link
Contributor

QA Resource Approval: +10

  • Testing instruction
  • Dev +1's
  • Dev/QA +10 with detail of what was tested
    • installed into separate project and ensured that previous functionality was preserved as well as new functionality
  • Unit test created/updated
  • All unit tests pass

Merging into master.

jayudey-wf added a commit that referenced this pull request Nov 3, 2015
CP-1091 Allow individual test files
@jayudey-wf jayudey-wf merged commit 5b96353 into master Nov 3, 2015
@evanweible-wf evanweible-wf deleted the individual_tests branch November 24, 2015 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants