diff options
Diffstat (limited to 'testenv/README')
-rw-r--r-- | testenv/README | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/testenv/README b/testenv/README index 3fee6ad..8ca80f2 100644 --- a/testenv/README +++ b/testenv/README @@ -43,7 +43,8 @@ Working: ================================================================================ The Test Files are valid Python scripts and the default mask for them is 755. -A singular Test must be invoked in the following manner: +A singular Test must be invoked in the following manner, with the current +directory being the testenv directory: $ ./python3 <Name of Test File> OR $ ./<Name of Test File> The script will then initialize the various elements and pass them to an object @@ -117,7 +118,6 @@ from misc.wget_file import WgetFile It is recommended that a small description of the Test Case is provided next. This would be very helpful to future contributors. -Next, is the const variable, TEST_NAME that defines the name of the Test. Each File in the Test must be represented as a WgetFile object. The WgetFile Class has the following prototype: @@ -130,14 +130,15 @@ The rules object is a dictionary element, with the key as the Rule Name and value as the Rule Data. In most cases, the Rule Data is another dictionary. Various variables used consistently across all tests are: - * WGET_OPTIONS: The command line string passed to Wget upon invokation. This + * WGET_OPTIONS: The command line string passed to Wget upon invocation. This string may contain URLs, like in the case where in-URL authentication is used. Variable names passed like {{var_name}} will be replaced by the contents of the variable self.var_name before being passed to Wget * WGET_URLS: This is a list of filenames which will be appended as the URLs - to Wget during invokation. This is a list of lists, where WGET_URLS[0] + to Wget during invocation. This is a list of lists, where WGET_URLS[0] represents the list of Filenames called from Server[0], WGET_URLS[1] is a - list of files downloaded from Server[2], etc. + list of files downloaded from Server[2], etc. They must be relative URLs, + i.e., not start with "/". * Files: This variable defines the files that exist in the Server's filesystem. The Files variable is a list of lists of WgetFile objects. This means that File[0] is a list of WgetFile objects that lie on Server[0], @@ -154,13 +155,11 @@ Various variables used consistently across all tests are: Both, the HTTPTest and FTPTest modules have the same prototype: { - name, pre_hook, test_options, post_hook, protocols } -name should be a string, and is usually passed to the TEST_NAME variable, the three hooks should be Python dict objects and protocols should be a list of protocols, like [HTTP, HTTPS]. @@ -215,7 +214,7 @@ executed. The currently supported options are: download. The complete URL will be created and passed to Wget automatically. (alias URLs) * WgetCommands : A string consisting of the various commandline switches - sent to Wget upon invokation. Any data placed between {{ }} in this string + sent to Wget upon invocation. Any data placed between {{ }} in this string will be replaced with the contents of self.<data> before being passed to Wget. This is particularly useful for getting the hostname and port for a file. While all Download URL's are passed to Urls, a notable exception is @@ -281,13 +280,6 @@ red-flagged as a XPASS. Currently, tests expected to fail under valgrind are not explicitly marked as XFAIL. Tests failing under valgrind must always be considered a blocking error. -Remember to always name the Test correctly using the TEST_NAME variable. This -is essential since a directory with the Test Name is created and this can -cause synchronization problems when the Parallel Test Harness is used. -One can use the following command on Unix systems to check for TEST_NAME -clashes: -$ grep -r -h "TEST_NAME =" | cut -c13- | uniq -c -d - Work Remaining: ================================================================================ |