--- tags: Rapi Document English --- # Rapi Runner Config File Format ```json { "input": { "testSuites": [ "./testsuite1.html", "./testsuite2.html", "./testsuite3.html" ], "variables": [ "./globalvar.json" ] }, "play": { "mode": 2, "entry": "", "noLog": false, "speed": 5, "autoWaitTimeout": 30, "period": { "time": -1, "maxNum": -1 } }, "report": { "path": "./", "type": "html", "snapshot": 2, "snapshotQuality": 20 }, "webdriver": { "configs": [ { "serverUrl": "http://localhost:4444", "type": "selenium", "browsers": [ { "active": true, "capability": { "browserName": "chrome", "goog:chromeOptions": { "args": [ "headless", "disable-gpu", "window-size=1080,720", "no-sandbox" ] } }, "keepSessionAlive": false }, { "active": true, "capability": { "browserName": "firefox", "moz:firefoxOptions": { "args": [ "-headless", "-disable-gpu", "-window-size=1080,720" ] } }, "keepSessionAlive": false } ], "sessions": [ { "sessionId": "existedSessionId", "keepSessionAlive": false } ] } ], "i18n": { "ja": "./ja.json" } } } ``` Format Description: * input * testSuites * Description: Set the file paths to the test suites * Value: A string array * Default: [] * variables * Description: Set the file paths to the variable files. Only accept json and csv files. * Value: A string array * Default: [] * play * mode * Description: The mode of playback. * Value: 0, 1, or 2 * Default: 2 * entry * Description: The entry test case or test suite when running. * If mode=0, this field should be set to a full name of test case, e.g. testsuite1.testcase1. * If mode=1, this field should be set to a test suite, e.g. testsuite2. * If mode=2, this field will be ignored. * Value: A string * Default: "" * noLog * Description: * Set to true to disable the log. * Value: boolean * Default: false * speed * Description: The speed of the playback. 5 is the fast speed. * Value: 1, 2, 3, 4, or 5. * Default: 5 * autoWaitTimeout * Description: The timeout before executing the next command. * Value: A number (in seconds) * Default: 30 * period * time * Description: The duration of the periodical running. Set to -1 to disable the periodical running. * Value: A number (in seconds) * Default: -1 * maxNum * Description: The maximum number of times of the periodical running. Set to -1 to run infinitely. * Value: A number * Default: -1 * report * type * Description: The type of the test report. * Value: "html" , "json" or "all" * Default: "html" * path (ineffective in Rapi API) * Description: The path for saving the test report. If the path does not exist, a folder of the path will be automatically created before running. * Value: A string * Default: "" * snapshot * Description: Playback with snapshots * 0 : No snapshot * 1 : Capture snapshots on errors * 2 : Always capture snapshots * Value: 0, 1, or 2 * Default: 2 * snapshotQuality * Description: Snapshot quality ranging from 1 to 100. 100 is the highest quality. A higher quality * Value will require more disk space. * Value: 1 to 100. * Default: 20 * webdriver * configs * serverUrl * Description: The URL of the WebDriver server. * Value: A URL string * Default: "" * type * Description: The type of the WebDriver server. * Value: "selenium" or "appium" * Default: "selenium" * browsers * Description: The browser capabilities to be matched * Value: An array * Default: [] * active * Description: Activate or inactivate the browser. * Value: boolean * Default: true * keepSessionAlive * Description: Set true to keep the webdriver session alive * Value: boolean * Default: false * capability * browserName * Description: The browser name. * Value: * For desktop browsers: "chrome", "firefox", "MicrosoftEdge", "safari" or "opera". * For mobile browsers: See here. * platformName * Description: The platform * Value: * For desktop browsers: "WINDOWS", "LINUX", or "MAC" * For mobile browsers: See here. * browserVersion * Description: The browser version. * Value: A string * (More Options) More options that follow W3C WebDriver Capability spec. For example, you can start the headless mode for different browsers: ```json // For Chrome "goog:chromeOptions": { "args": [ "headless", "disable-gpu", "window-size=1080,720", "no-sandbox" ] } // For Firefox "moz:firefoxOptions": { "args": [ "-headless", "-disable-gpu", "-window-size=1080,720" ] } ``` * sessions * sessionId * Description: The existing session id string on the webdriver * Value: string * default: "" * keepSessionAlive * Description: Set true to keep the webdriver session alive * Value: boolean * Default: false * i18n * Description: Language codes and files paths. All the language codes can be found in the Option page of SideeX Recorder. All the languages set here will be run in order. See Internationalization (i18n) Testing Using SideeX for more information. * Value: Mapping from language codes to language files. ```json { "ja": "./ja.json", "ZH-tw": "./tw.json" } ``` * Default: undefined