Requirements and Specification
Use Cases
No items recorded at this level.
Potential Errors
No items recorded at this level.
Test Specifications
No items recorded at this level.
System Requirements
TRLC System_requirement_aspect json_req.Input_File
IF a list element given through the command line option "FILE_OR_DIR" is a file (Note: Symbolic links shall be resolved. The tool shall not differentiate between symbolic links and true paths.)
TRLC System_requirement_aspect json_req.Input_File_Valid_JSON
AND IF the file content is invalid JSON, THEN the tool shall exit with a non-zero return code.
Issues:
missing up reference
missing reference to Software Requirements
missing reference to System Tests
TRLC System_requirement_aspect json_req.Input_File_Input_Items
OTHERWISE the input data SHALL be written in the LOBSTER interchange format
Issues:
missing up reference
missing reference to Software Requirements
missing reference to System Tests
TRLC System_requirement_aspect json_req.Input_File_To_File
to the file given in the command line option "out", IF that option is given AND is not an empty string;
Issues:
missing up reference
missing reference to Software Requirements
missing reference to System Tests
TRLC System_requirement_aspect json_req.Input_File_To_Stdout
Issues:
missing up reference
missing reference to Software Requirements
missing reference to System Tests
TRLC System_requirement_aspect json_req.Input_File_Output_Error
IF the operating system fails to fully serialize the output to a file, THEN the tool shall print an error message to STDERR and exit with a non-zero return code.
Issues:
missing up reference
missing reference to Software Requirements
missing reference to System Tests
TRLC System_requirement json_req.Input_File_JSON_Extension
IF [[Input_File]] AND IF the file extension is not "json" (case-insensitive), THEN the tool shall print a warning.
Issues:
missing up reference
missing reference to Software Requirements
TRLC System_requirement json_req.Input_Not_File_Not_Directory
IF a list element given through the configuration file under "inputs" is not a file nor a directory, THEN the tool shall exit with a non-zero return code. Note: This could happen if a path does not exist.
Issues:
missing up reference
missing reference to Software Requirements
TRLC System_requirement json_req.Name_Attribute_Given
In addition to [[Parse_Input_File]], IF the command line option "name-attribute" is given and not an empty string, AND the input items contains that key THEN the tool SHALL use the value of that key as tag in the serialized LOBSTER item.
Issues:
missing up reference
missing reference to Software Requirements
TRLC System_requirement_aspect json_req.Name_Attribute_Given_Key_Missing
OTHERWISE (if they key does not exist) the tool SHALL print an error message.
Issues:
missing up reference
missing reference to Software Requirements
TRLC System_requirement_aspect json_req.Name_Attribute_Missing
OTHERWISE ("name-attribute" is not given or not an empty string), the tool SHALL create a synthetic tag name based on the path of the JSON input file and an item counter. Notes: - "Synthetic" means that, the name does not need to be related to the data. - The item counter does not need to be unique across input files, but it shall be unique at least for each input file separately. - No further specification is made about how to combine the path and the item counter.
Issues:
missing up reference
missing reference to Software Requirements
Software Requirements
No items recorded at this level.
Implementation
Code
Python Constructor json.Malformed_Input.__init__
Python Function json.get_item
Python Function json.syn_test_name
Python Constructor json.LOBSTER_Json.__init__
Python Method json.LOBSTER_Json.get_config_keys_manual
Python Method json.LOBSTER_Json.get_mandatory_parameters
Python Method json.LOBSTER_Json.process_commandline_and_yaml_options
Python Method json.LOBSTER_Json.process_tool_options
Python Method json.LOBSTER_Json.process
Python Function json.main
Verification and Validation
System Tests
tests_system/lobster_json/lobsterjsontestrunner.py
PyUnit Test lobsterjsontestrunner.LobsterJsonTestRunner.run_tool_test:92
tests_system/lobster_json/test_config_exceptions.py
PyUnit Test test_config_exceptions.ConfigParserExceptionsLobsterJsonTest.test_missing_config_file:12
PyUnit Test test_config_exceptions.ConfigParserExceptionsLobsterJsonTest.test_config_file_errors:26
PyUnit Test test_config_exceptions.ConfigParserExceptionsLobsterJsonTest.test_config_file_empty:36
tests_system/lobster_json/test_directories.py
PyUnit Test test_directories.InputDirectoryJsonTest.test_missing_directory:14
PyUnit Test test_directories.InputDirectoryJsonTest.test_empty_directory:28
PyUnit Test test_directories.InputDirectoryJsonTest.test_consumes_files_in_specified_directory:45
PyUnit Test test_directories.InputDirectoryJsonTest.test_mix_inputs_from_directory:65
PyUnit Test test_input_not_file_not_directory.InputNotFileNotDirectoryTest.test_nothing_exists:30
PyUnit Test test_input_not_file_not_directory.InputNotFileNotDirectoryTest.test_one_file_exists:40
PyUnit Test test_inputs_and_inputs_from_file.InputsAndInputsFromFileParameterTest.test_inputs:18
PyUnit Test test_inputs_and_inputs_from_file.InputsAndInputsFromFileParameterTest.test_inputs_from_file:37
PyUnit Test test_inputs_and_inputs_from_file.InputsAndInputsFromFileParameterTest.test_consume_files_from_cwd:52
PyUnit Test test_inputs_and_inputs_from_file.InputsAndInputsFromFileParameterTest.test_consume_files_and_nested_directory_from_cwd:69
PyUnit Test test_inputs_and_inputs_from_file.InputsAndInputsFromFileParameterTest.test_inputs_from_file_and_input:91
tests_system/lobster_json/test_json_extension.py
PyUnit Test test_json_extension.JsonExtensionTest.test_single_non_json_extensions:15
PyUnit Test test_json_extension.JsonExtensionTest.test_mixed_extensions:32
PyUnit Test test_json_extension.JsonExtensionTest.test_invalid_json_content:50
PyUnit Test test_json_extension.JsonExtensionTest.test_inputs_and_inputs_from_files_with_mixed_extension:58
tests_system/lobster_json/test_justification_attribute.py
PyUnit Test test_justification_attribute.JsonJustificationAttributeTest.test_justification_attribute_given:13
PyUnit Test test_justification_attribute.JsonJustificationAttributeTest.test_justification_attribute_given_but_key_missing:29
PyUnit Test test_justification_attribute.JsonJustificationAttributeTest.test_justification_attribute_not_given:46
tests_system/lobster_json/test_multiple_files.py
PyUnit Test test_multiple_files.JsonMultipleFilesTest.test_multiple_input_files_specified_in_config:14
PyUnit Test test_multiple_files.JsonMultipleFilesTest.test_directory_with_empty_invalid_file:44
PyUnit Test test_multiple_files.JsonMultipleFilesTest.test_inputs_from_file_specified_in_config:64
PyUnit Test test_multiple_files.JsonMultipleFilesTest.test_inputs_and_inputs_from_file_With_extra_valid_files:92
tests_system/lobster_json/test_name_attribute.py
PyUnit Test test_name_attribute.JsonExtensionTest.test_attribute_given:15
PyUnit Test test_name_attribute.JsonExtensionTest.test_attribute_given_but_key_missing:30
PyUnit Test test_name_attribute.JsonExtensionTest.test_name_attribute_missing_flat_input:47
PyUnit Test test_name_attribute.JsonExtensionTest.test_name_attribute_missing_nested_input:61
tests_system/lobster_json/test_tag_attribute.py
PyUnit Test test_tag_attribute.JsonTagAttributeTest.test_tag_attribute_given:11
PyUnit Test test_tag_attribute.JsonTagAttributeTest.test_tag_attribute_given_but_key_missing:26
PyUnit Test test_tag_attribute.JsonTagAttributeTest.test_tag_attribute_missing:41
PyUnit Test test_valid_input.ValidInputTest.test_input_with_specific_schema:11
Software Tests
No items recorded at this level.