Description Usage Arguments Details Examples
This changes Parse's application to a separate application that can be used
for testing, then deletes all objects that you request within it.
To use this, set up three system variables:
PARSE_APPLICATION_ID_TEST
, PARSE_API_KEY_TEST
, and
PARSE_MASTER_KEY_TEST
. These should point somewhere besides your
production application. If requested, it will leave the test in the
master key state, and can back up the environment variables so that the
parse_restore_state
function will return them.
1 2 |
to_remove |
a list of class names of objects to be cleared from the test environment |
master |
whether to leave the master key set |
backup |
whether to back environment variables up (be careful to set this as FALSE if you are calling this a second time) |
error |
whether to throw an error if the environment variables aren't set |
message |
whether to display an message if the environment variables aren't set |
error
is set to TRUE by default to ensure you don't try to set up
a test environment, fail, and run tests on your production database.
If you set error = TRUE
, be sure you put all your tests in an
if statement.
1 2 3 4 5 6 7 | ## Not run:
if (parse_setup_test(error = FALSE)) {
# run some tests, then
parse_restore_state()
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.