Test_Unit

ASGA module for testing each function/tools in the ASGA software

Version   0.34.1
Data       10.03.2021
Author    Robert kiewisz
Depends Shiny shinyWidgets tidyverse
License    GPL V3.0

Description The test unit is composed of two-part (Test_Functions, Test_Output) and GUI part for display error messages Test_Result


Test_Functions


Description

The part of the test unit is designed for quick and straightforward testing if the tool is passing the test data set

Usage

 tryCatch(
      {
        callModule(`Name`, "Home")
        Test_value[1, `ID`] <<- TRUE
      },
      error = function(e) {
        Test_value[1, `ID`] <<- FALSE
      }
    )
    names(Test_value)[`ID`] <<- `Name`

<server.R>
      callModule(Load_Data, "Home")
      callModule(Test_Functions, "Home")
      callModule(Test_Output, "Home")

Arguments

Name Testing function class name
ID Continue number in data_frame


Example

    tryCatch(
      {
        callModule(Pre_Analysis, "Home")
        Test_value[1, 1] <<- TRUE
      },
      error = function(e) {
        Test_value[1, 1] <<- FALSE
      }
    )
    names(Test_value)[1] <<- "Pre_Analsis"

<server.R>
      callModule(Load_Data, "Home")
      callModule(Test_Functions, "Home")
      callModule(Test_Output, "Home")




Test_Output


Description

The part of the test unit is designed for testing of the core functionality of the ASGA as well as testing tools output

Usage

Test_df[1, `ID`] <<- Test_anaysis(`Name`, 
                                  P1_P2 = TRUE, 
                                  EXP_ncol = 6, 
                                  EXP_ncol = c(4,2,2))

Arguments

Name Testing function class name
ID Continue number in data_frame
P1_P2 TRUE FALSE value if P1 and P2 tools spited data for pole1 and pole2
EXP_ncol Expected number of columns from standard test data set
EXP_ncol Expected number of rows from standard test data set


Example

Test_df[1, 10] <<- Test_anaysis("Data_1_LD", 
                                TRUE, 
                                6, 
                                c(4,2,2))

<server.R>
      callModule(Load_Data, "Home")
      callModule(Test_Functions, "Home")
      callModule(Test_Output, "Home")




Test_Result


Description

The part of the test unit that gave two types of GUI message to the user:

Pass all test correctly Green
Error occurred Yellow and error number indicating ID corresponding to testing function class name