Skip to content

Make it easier to run large number of serial tests #683

Closed as not planned
Closed as not planned
@0xTim

Description

@0xTim

Description

Something that's cropped up recently and open for discussion!

There are a number of scenarios where you might need to run tests serially, especially when it comes to integration tests (for example running tests against a real database). Currently, with Swift Testing you only have two options to accommodate this, both of which have drawbacks:

  • run test tests with the --no-parallel - this is problematic if you have different tests you want to run as well that can be run in parallel
  • create a test suite with the .serialized trait - if you have lots of tests you end up with a giant test file that's difficult to maintain. You can still have multiple suites that are marked as serialized, but whilst the tests inside them will be serial, the suites themselves will not, causing clashes.

It would be great to have a better solution to handle use cases like this, either some kind of new trait or flag -no-parallel-serial-tests etc.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    concurrency🔀 Swift concurrency/sendability issuesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions