Skip to content

Introspection APIs #366

Description

@eschaton

I've been doing ANSI C projects for fun the past couple of years, and I'll often start out writing my tests using XCTest in Xcode out of convenience, and then migrating them to Check for wider platform support. (I worked on Xcode for a couple decades before retiring a couple of years ago, and was responsible for integrating testing support into Xcode way back in Xcode 2.1…)

Like other IDEs, Xcode's test infrastructure is at least somewhat amenable to a degree of integration with Check. However, to get better integration than just catching failures, Check will need some additional APIs beyond getting a TestResult collection after a run. In particular, I would need to be able to iterate over the Suite and Test instances in a Suite before running them, and to be able to run an individual Test or Suite.

Having these APIs would allow me to create XCTestSuite and XCTestCase subclasses that can (at setup time) generate further synthetic subclasses and methods at runtime that can be used to map Xcode's runtime test specifiers to the specific Check Suite and Test to invoke, and then report their state back to Xcode in a way it'll present as success or failure with proper source annotation. (None of this should require an Xcode plug-in or anything of the sort, it should all be doable within the XCTest API if Check itself has the necessary API.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions