Skip to content

Remove TemporaryGettingStarted.md. #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ Larger changes that _do_ materially change the semantics of Swift Testing,
such as new APIs or modifications to existing APIs, must undergo community
discussion prior to being accepted.

> [!IMPORTANT]
> Since this package is currently experimental, a formal process for proposing
> and reviewing significant changes has not yet been established. Until that
> happens, please start a new discussion thread on the
> [Swift forums](https://forums.swift.org) about any such changes prior to
> submitting a PR.

To learn how to write tests using the testing library, rather than how to
contribute to the testing library itself, see
[Getting Started](https://github.com/swiftlang/swift-testing/tree/main/Sources/Testing/Testing.docc/TemporaryGettingStarted.md).

## Reporting issues

Issues are tracked using the testing library's
Expand All @@ -41,8 +30,8 @@ and clone the fork which will make opening PRs easier.

### Using Xcode (easiest)

1. Install the latest beta version of
[Xcode](https://developer.apple.com/xcode).
1. Install Xcode 16 or newer from the [Apple Developer](https://developer.apple.com/xcode/)
website.
1. Open the `Package.swift` file from the cloned Swift Testing repository in
Xcode.
1. Select the `swift-testing-Package` scheme (if not already selected) and the
Expand Down
7 changes: 6 additions & 1 deletion Documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ directory.

The [Vision document](https://github.com/swiftlang/swift-evolution/blob/main/visions/swift-testing.md)
for Swift Testing offers a comprehensive discussion of the project's design
principles and goals.
principles and goals.

## Development and contribution

Expand All @@ -41,6 +41,11 @@ principles and goals.
- [SPI groups in Swift Testing](https://github.com/swiftlang/swift-testing/blob/main/Documentation/SPI.md)
describes when and how the testing library uses Swift SPI.

## Experimental platform support

- Instructions are provided for running tests against a
[WASI/WebAssembly target](https://github.com/swiftlang/swift-testing/blob/main/Documentation/WASI.md).

## Project maintenance

- The [Releases](https://github.com/swiftlang/swift-testing/blob/main/Documentation/Releases.md)
Expand Down
7 changes: 0 additions & 7 deletions Documentation/Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ be updated so that the release can be used as a package dependency:

1. Delete any unsafe flags from `var packageSettings` as well as elsewhere in
the package manifest files.
1. Open the "Documentation/Testing.docc/TemporaryGettingStarted.md" file and
update the line:

```diff
- .package(url: "https://github.com/swiftlang/swift-testing.git", branch: "main"),
+ .package(url: "https://github.com/swiftlang/swift-testing.git", from: "x.y.z"),
```

The repository's local state is now updated. To commit it to your branch, run
the typical commit command:
Expand Down
44 changes: 44 additions & 0 deletions Documentation/WASI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Running tests for WebAssembly

<!--
This source file is part of the Swift.org open source project

Copyright (c) 2023-2024 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
-->

<!-- NOTE: The voice of this document is directed at the second person ("you")
because it provides instructions the reader must follow directly. -->

To run tests for WebAssembly, install a Swift SDK for WebAssembly by following
[these instructions](https://book.swiftwasm.org/getting-started/setup-snapshot.html).

Because `swift test` doesn't know what WebAssembly environment you'd like to use
to run your tests, building tests and running them are two separate steps. To
build tests for WebAssembly, use the following command:

```sh
swift build --swift-sdk wasm32-unknown-wasi --build-tests
```

After building tests, you can run them using a [WASI](https://wasi.dev/)-compliant
WebAssembly runtime such as [Wasmtime](https://wasmtime.dev/) or
[WasmKit](https://github.com/swiftwasm/WasmKit). For example, to run tests using
Wasmtime, use the following command (replace `{YOURPACKAGE}` with your package's
name):

```sh
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm --testing-library swift-testing
```

Most WebAssembly runtimes forward trailing arguments to the WebAssembly program,
so you can pass command-line options of the testing library. For example, to list
all tests and filter them by name, use the following commands:

```sh
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm list --testing-library swift-testing
wasmtime .build/debug/{YOURPACKAGE}PackageTests.wasm --testing-library swift-testing --filter "FoodTruckTests.foodTruckExists"
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ incrementally, at your own pace.
Detailed documentation for Swift Testing can be found on the
[Swift Package Index](https://swiftpackageindex.com/swiftlang/swift-testing/main/documentation/testing).
There, you can delve into comprehensive guides, tutorials, and API references to
make the most out of this package. To try it yourself, see
[Getting Started](https://swiftpackageindex.com/swiftlang/swift-testing/main/documentation/testing/temporarygettingstarted).
make the most out of this package. Swift Testing is included with the Swift 6
toolchain and Xcode 16.

Other documentation resources for this project can be found in the
[README](https://github.com/swiftlang/swift-testing/blob/main/Documentation/README.md)
Expand Down
4 changes: 0 additions & 4 deletions Sources/Testing/Testing.docc/DefiningTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Define a test function to validate that code is working correctly.

Defining a test function for a Swift package or project is straightforward.

This article assumes that the package or project being tested has already been
configured with a test target. For help configuring a package to use the testing
library, see <doc:TemporaryGettingStarted>.

### Import the testing library

To import the testing library, add the following to the Swift source file that
Expand Down
1 change: 0 additions & 1 deletion Sources/Testing/Testing.docc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ their problems.

### Essentials

- <doc:TemporaryGettingStarted>
- <doc:DefiningTests>
- <doc:OrganizingTests>
- <doc:MigratingFromXCTest>
Expand Down
6 changes: 0 additions & 6 deletions Sources/Testing/Testing.docc/MigratingFromXCTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ The testing library provides much of the same functionality of XCTest, but uses
its own syntax to declare test functions and types. Here, you'll learn how to
convert XCTest-based content to use the testing library instead.

### Add the testing library as a dependency

Before the testing library can be used, it must be added as a dependency of your
Swift package or Xcode project. For more information on how to add it, see the
[Getting Started](doc:TemporaryGettingStarted) guide.

### Import the testing library

XCTest and the testing library are available from different modules. Instead of
Expand Down
178 changes: 0 additions & 178 deletions Sources/Testing/Testing.docc/TemporaryGettingStarted.md

This file was deleted.