DIGI-VUB / recogito

Interactive Annotation of Text and Images
Other
21 stars 6 forks source link

Recogito 171 #2

Closed jpbida closed 2 years ago

jpbida commented 2 years ago

Description

Added testing for recogito functionality. Updated to recogito version 1.7.1

Testing

Two example applications are provided for recogito

Before running the unit tests these two applications need to be running on port 5447 and 5448 on the localhost

library(shiny)
library(devtools)
devtools::load_all()
appDir = system.file(package="recogito","examples/recogito")
runApp(appDir,port=5447L)

In another R session

library(shiny)
library(devtools)
devtools::load_all()
appDir = system.file(package="recogito","examples/recogitotagsonly")
runApp(appDir,port=5448L)

In a third R session with working directory in the recogito package directory you can run the selenium tests

devtools::test()

See documentation from RSelenium for more details

jwijffels commented 2 years ago

what a work on the unit tests, wasn't expecting this.

jwijffels commented 2 years ago

Pretty ingenious unit tests. Never did this myself. Isn't there a way around launching 2 shiny sessions and only in the 3rd doing the unit testing? Maybe with the https://github.com/rstudio/chromote package?