Skip to content

Commit

Permalink
doc: Update README with CLI setup (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
polok authored Oct 23, 2024
1 parent 6ffc416 commit 84a7c3f
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,35 +318,66 @@ options.onActivation = { ... }
let f = try createInstance(options: options)
```

### Test runner
### CLI

### Options
To install it locally use below commands. Note, we use featurevisor-swift to avoid conflicts with other Featurevisor CLIs

```bash
'only-failures'
$ cd path/to/featurevisor-swift-sdk
$ swift build -c release
$ cd .build/release
$ cp -f Featurevisor /usr/local/bin/featurevisor-swift
```

If you are interested to see only the test specs that fail:
Now you can usage like below:
```bash
$ cd path/to/featurevisor-project-with-yamls
$ featurevisor-swift test .
```

Example command:
To install via Swift Package Manager, you need to add it as a dependency under your `Package.swift` file , where `X.X.X` is the version which you want to use.

```swift
dependencies: [
.package(
url: "https://github.com/featurevisor/featurevisor-swift",
exact: "X.X.X"
)
]
```

To run use below command:

```bash
$ swift run featurevisor test .
```

You can also install it locally using below commands. Note, we use featurevisor-swift to avoid conflicts with other Featurevisor CLIs
To update the swift's featurevisor use below command:

```bash
$ swift package update
```
$ cd path/to/featurevisor-swift-sdk
$ swift build -c release
$ cd .build/release
$ cp -f Featurevisor /usr/local/bin/featurevisor-swift

### Tests
If you would like to test your feature/s setup against Swift SDK you can do this by invoking the below command.
Currently, it takes all features which are being supported by `ios` and `tvos` and run tests for them.

```bash
$ swift run featurevisor test .
```

Now you can usage like below:
#### Options

```bash
'only-failures'
```
$ cd path/to/featurevisor-project-with-yamls
$ featurevisor-swift test .

If you are interested to see only the test specs that fail:

Example command:

```
$ swift run featurevisor test --only-failures .
```

### Benchmarking
Expand Down

0 comments on commit 84a7c3f

Please sign in to comment.