Skip to content

chore!: Skip all tests using AppDriver during CRAN testing. Deprecate cran= parameters#407

Merged
schloerke merged 8 commits intomainfrom
no_exec_on_cran
Mar 26, 2025
Merged

chore!: Skip all tests using AppDriver during CRAN testing. Deprecate cran= parameters#407
schloerke merged 8 commits intomainfrom
no_exec_on_cran

Conversation

@schloerke
Copy link
Collaborator

@schloerke schloerke commented Mar 25, 2025

We have been told that a chrome update means using chromote is not reliable.

Note that the manual says that external commands (here 'chrome') must be
used conditionally, so changes should not have resulted in a check
failure. But it did in shiny.destroy, shinytest2 and shinyscholar
(already attempted a resubmisison) now fail their checks -- see the
M1mac additional issues.

So it seems we need

  • urgently a chromote update
  • packages using it to ensure that they use chrome in a way that will
    never give a check failure. Before 2025-04-03 to safely retain the
    packages on CRAN.

And it would have been basic good manners for the chromote maintainer to
keep CRAN and its users informed. You agreed to the policy which says

"The time of the volunteers is CRAN’s most precious resource"

Note that end users (including me who never knowingly uses chrome) get
chrome updates silently behind their backs and will have no idea what
version is currently installed nor what changed. Seems to have been
Version 134.0.6998.89.e

- CRAN


To address this, shinytest2 will also take the stance of never testing on CRAN as it requires chromote to work.

We will now call testthat::skip_on_cran() if an AppDriver is attempted to be created during CRAN testing. To escape this behavior, set the system environment variable SHINYTEST2_APP_DRIVER_TEST_ON_CRAN=1.

@schloerke schloerke changed the title chore: Disable AppDriver on CRAN. Deprecate cran= parameters chore!: Disable AppDriver on CRAN. Deprecate cran= parameters Mar 26, 2025
@schloerke schloerke changed the title chore!: Disable AppDriver on CRAN. Deprecate cran= parameters chore!: Skip all tests using AppDriver during CRAN testing. Deprecate cran= parameters Mar 26, 2025
@schloerke schloerke marked this pull request as ready for review March 26, 2025 16:07
@schloerke schloerke requested a review from Copilot March 26, 2025 16:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the release notes to reflect a breaking change where any attempt to create an AppDriver during CRAN testing will trigger a call to testthat::skip_on_cran().

  • Introduces a new "Breaking changes" section in NEWS.md.
  • Documents the behavior change related to AppDriver and CRAN testing.
Files not reviewed (13)
  • DESCRIPTION: Language not supported
  • NAMESPACE: Language not supported
  • R/app-driver-expect-download.R: Language not supported
  • R/app-driver-expect-js.R: Language not supported
  • R/app-driver-expect-screenshot.R: Language not supported
  • R/app-driver-expect-values.R: Language not supported
  • R/app-driver-initialize.R: Language not supported
  • R/app-driver.R: Language not supported
  • R/expect-snapshot.R: Language not supported
  • man-roxygen/app-cran.R: Language not supported
  • man-roxygen/variant.R: Language not supported
  • man/AppDriver.Rd: Language not supported
  • vignettes/use-package.Rmd: Language not supported

@schloerke schloerke requested a review from gadenbuie March 26, 2025 16:09
Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

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

Let's do two additional things:

  1. Add a scary-looking environment variable that could be used to enable shinytest2 tests on CRAN
  2. Add this to the NEWS, along with link to shinytest2 article on package testing

Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
@schloerke schloerke merged commit 0679813 into main Mar 26, 2025
18 checks passed
@schloerke schloerke deleted the no_exec_on_cran branch March 26, 2025 18:21
schloerke added a commit that referenced this pull request Nov 18, 2025
* main:
  fix(snapshot): Use local testthat edition to announcing files (#419)
  feat: Allow for dev packages to be dynamically loaded (#402)
  fix(testthat): Use `muffle_expectation`, not `continue_test` (#418)
  v0.4.1 (#415)
  fix: default `transform=` to NULL, not itself (#413)
  Increment version number to 0.4.0.9000
  v0.4.0 (#410)
  Pre-release cleanups for shinytest 2 0.3.3 (#409)
  feat: Add `transform=` parameter to `$expect_download()` and `$expect_values()` (#403)
  chore!: Skip all tests using `AppDriver` during CRAN testing. Deprecate `cran=` parameters (#407)
  docs: Namespace `ChromoteSession` (#406)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants