Skip to content
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

docs(contrib): Add documentation for ui tests #10758

Merged
merged 2 commits into from
Jun 20, 2022
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Jun 14, 2022

What does this PR try to resolve?

This only adds information about snapshot testing using snapbox and
keeps the functional testing documentation focused on the existing
facilities. We can updated this as our use of snapbox matures.

How should we test and review this PR?

I did not generate and verify the HTML

In writing this, I did notice that we define
cargo_test_support::compare::assert but only use it for filesystem
asserts and not binary asserts. We should probably add our own function
that wraps snapbox::cmd::Command::cargo() and passes in
cargo_test_support::compare::assert. I've left that out of this PR to
keep things focused.

@rust-highfive
Copy link

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 14, 2022
Copy link
Member

@Muscraft Muscraft left a comment

Choose a reason for hiding this comment

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

I like the changes. It covers snapbox and UI tests really well

src/doc/contrib/src/tests/writing.md Outdated Show resolved Hide resolved
src/doc/contrib/src/tests/writing.md Outdated Show resolved Hide resolved
src/doc/contrib/src/tests/writing.md Outdated Show resolved Hide resolved
This only adds information about snapshot testing using `snapbox` and
keeps the functional testing documentation focused on the existing
facilities.  We can updated this as our use of `snapbox` matures.

In writing this, I did notice that we define
`cargo_test_support::compare::assert` but only use it for filesystem
asserts and not binary asserts.  We should probably add our own function
that wraps `snapbox::cmd::Command::cargo()` and passes in
`cargo_test_support::compare::assert`.  I've left that out of this PR to
keep things focused.
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Looks really nice! Love the re-structure.

src/doc/contrib/src/tests/writing.md Show resolved Hide resolved
@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 20, 2022

📌 Commit 619630c has been approved by weihanglo

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2022
@bors
Copy link
Contributor

bors commented Jun 20, 2022

⌛ Testing commit 619630c with merge 8fd9f82...

@bors
Copy link
Contributor

bors commented Jun 20, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 8fd9f82 to master...

@bors bors merged commit 8fd9f82 into rust-lang:master Jun 20, 2022
arlosi added a commit to arlosi/rust that referenced this pull request Jun 23, 2022
8 commits in 03a849043e25104e8b7ad0d4a96c525787b69379..a5e08c4703f202e30cdaf80ca3e7c00baa59c496
2022-06-20 14:47:36 +0000 to 2022-06-23 20:12:03 +0000
- Fix tests due to change in dead_code diagnostic. (rust-lang/cargo#10785)
- Stabilize config-cli (rust-lang/cargo#10755)
- Restrict duplicate deps warning only to published packages (rust-lang/cargo#10767)
- Use fingerprint_hash when computing fingerprints for custom targets (rust-lang/cargo#10746)
- Add preloading for workspace packages in `resolve_with_previous` (rust-lang/cargo#10761)
- capitalise, for consistency (rust-lang/cargo#10772)
- remove unused dependency from benchsuite (rust-lang/cargo#10774)
- docs(contrib): Add documentation for ui tests (rust-lang/cargo#10758)
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 24, 2022
Update cargo

8 commits in 03a849043e25104e8b7ad0d4a96c525787b69379..a5e08c4703f202e30cdaf80ca3e7c00baa59c496
2022-06-20 14:47:36 +0000 to 2022-06-23 20:12:03 +0000
- Fix tests due to change in dead_code diagnostic. (rust-lang/cargo#10785)
- Stabilize config-cli (rust-lang/cargo#10755)
- Restrict duplicate deps warning only to published packages (rust-lang/cargo#10767)
- Use fingerprint_hash when computing fingerprints for custom targets (rust-lang/cargo#10746)
- Add preloading for workspace packages in `resolve_with_previous` (rust-lang/cargo#10761)
- capitalise, for consistency (rust-lang/cargo#10772)
- remove unused dependency from benchsuite (rust-lang/cargo#10774)
- docs(contrib): Add documentation for ui tests (rust-lang/cargo#10758)
@epage epage deleted the docs branch July 1, 2022 15:36
@ehuss ehuss added this to the 1.63.0 milestone Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants