From cf0a4c1c49cbd415ae7ee93a7b25d7843b325bab Mon Sep 17 00:00:00 2001 From: sudeeptarlekar Date: Mon, 2 Dec 2024 13:06:15 +0100 Subject: [PATCH] Remove test_setups Attribute test_setups is replaced by verification_methods. This PR removes the backward compatibility for test_setups. Fixes: #24 --- dim/lib/dim/commands/format.rb | 2 - dim/lib/dim/consistency.rb | 32 +-- dim/lib/dim/exporter/csv.rb | 1 - dim/lib/dim/exporter/json.rb | 2 - dim/lib/dim/loader.rb | 3 - dim/lib/dim/requirement.rb | 22 +- dim/req/dim.dim | 29 --- dim/spec/export_spec.rb | 29 --- dim/spec/format_spec.rb | 26 --- dim/spec/property_spec.rb | 2 - dim/spec/requirement_spec.rb | 220 +++++------------- dim/spec/test_input/convenience/module_ok.dim | 24 +- .../export_calculated_infos/Input1.yml | 6 +- .../export_check/export_test_12_1.dim | 2 +- .../export_check/export_test_12_2.dim | 2 +- .../export_check/no_check_enclosed.dim | 2 +- .../export_check/test_export_06.dim | 2 +- .../export_check/test_export_07.dim | 2 +- .../export_check/test_export_08.dim | 2 +- .../export_check/test_export_09.dim | 2 +- .../export_check/test_export_10.dim | 2 +- .../export_check/test_export_11.dim | 2 +- .../test_input/export_check/test_module_1.dim | 2 +- .../test_input/format/collection/order.dim | 2 +- .../format/collection/test_setups.dim | 11 - .../collection/test_setups.dim.expected | 14 -- .../invalid_input/modules/test_module_1.dim | 2 +- .../test_input/no_tester/test_module_1.dim | 2 +- .../prefix_check/req/test_module_3.dim | 2 +- .../test_input/prefix_check/test_module_1.dim | 2 +- .../test_input/prefix_check/test_module_2.dim | 2 +- .../property_file_insertion/properties.yaml | 2 +- .../test_module_for_insertion.dim | 2 +- .../test_setups/properties.yaml | 2 +- dim/spec/test_input/reqs/ts/duplicate.dim | 4 - dim/spec/test_input/reqs/ts/empty.dim | 4 - dim/spec/test_input/reqs/ts/invalid_type.dim | 6 - dim/spec/test_input/reqs/ts/unknown.dim | 4 - dim/spec/test_input/reqs/ts/valid.dim | 7 - .../reqs/{ts => vm}/combined_none.dim | 2 +- .../test_input/reqs/{ts => vm}/default.dim | 0 .../reqs/{ts => vm}/default_config.dim | 0 dim/spec/test_input/reqs/vm/duplicate.dim | 4 + dim/spec/test_input/reqs/vm/empty.dim | 4 + dim/spec/test_input/reqs/vm/invalid_type.dim | 6 + .../verification_methods/Requirement.csv | 2 +- .../verification_methods/Requirements.json | 2 +- .../verification_methods/Requirements.rst | 2 +- .../reqs/{ts => vm}/resolve_config.dim | 0 .../reqs/{ts => vm}/resolve_input.dim | 0 .../reqs/{ts => vm}/resolve_module.dim | 0 .../reqs/{ts => vm}/resolve_software.dim | 0 dim/spec/test_input/reqs/vm/unknown.dim | 4 + dim/spec/test_input/reqs/vm/valid.dim | 7 + .../resolved_function/modules/Module1.dim | 2 +- .../verification_methods/all_none.dim | 5 - .../all_none.dim.expected | 4 - .../verification_methods/none_test_setups.dim | 5 - .../none_verification_methods.dim | 6 - .../verification_methods/single_none.dim | 7 - .../single_none.dim.expected | 7 - .../verification_methods.dim | 21 -- .../verification_methods.dim.expected | 18 -- .../output/csv/Requirements.csv | 2 +- .../output/rst/Requirements.rst | 6 +- 65 files changed, 124 insertions(+), 478 deletions(-) delete mode 100644 dim/spec/test_input/format/collection/test_setups.dim delete mode 100644 dim/spec/test_input/format/collection/test_setups.dim.expected delete mode 100644 dim/spec/test_input/reqs/ts/duplicate.dim delete mode 100644 dim/spec/test_input/reqs/ts/empty.dim delete mode 100644 dim/spec/test_input/reqs/ts/invalid_type.dim delete mode 100644 dim/spec/test_input/reqs/ts/unknown.dim delete mode 100644 dim/spec/test_input/reqs/ts/valid.dim rename dim/spec/test_input/reqs/{ts => vm}/combined_none.dim (53%) rename dim/spec/test_input/reqs/{ts => vm}/default.dim (100%) rename dim/spec/test_input/reqs/{ts => vm}/default_config.dim (100%) create mode 100644 dim/spec/test_input/reqs/vm/duplicate.dim create mode 100644 dim/spec/test_input/reqs/vm/empty.dim create mode 100644 dim/spec/test_input/reqs/vm/invalid_type.dim rename dim/spec/test_input/{verification_methods => reqs/vm}/output/verification_methods/Requirement.csv (74%) rename dim/spec/test_input/{verification_methods => reqs/vm}/output/verification_methods/Requirements.json (93%) rename dim/spec/test_input/{verification_methods => reqs/vm}/output/verification_methods/Requirements.rst (91%) rename dim/spec/test_input/reqs/{ts => vm}/resolve_config.dim (100%) rename dim/spec/test_input/reqs/{ts => vm}/resolve_input.dim (100%) rename dim/spec/test_input/reqs/{ts => vm}/resolve_module.dim (100%) rename dim/spec/test_input/reqs/{ts => vm}/resolve_software.dim (100%) create mode 100644 dim/spec/test_input/reqs/vm/unknown.dim create mode 100644 dim/spec/test_input/reqs/vm/valid.dim delete mode 100644 dim/spec/test_input/verification_methods/all_none.dim delete mode 100644 dim/spec/test_input/verification_methods/all_none.dim.expected delete mode 100644 dim/spec/test_input/verification_methods/none_test_setups.dim delete mode 100644 dim/spec/test_input/verification_methods/none_verification_methods.dim delete mode 100644 dim/spec/test_input/verification_methods/single_none.dim delete mode 100644 dim/spec/test_input/verification_methods/single_none.dim.expected delete mode 100644 dim/spec/test_input/verification_methods/verification_methods.dim delete mode 100644 dim/spec/test_input/verification_methods/verification_methods.dim.expected diff --git a/dim/lib/dim/commands/format.rb b/dim/lib/dim/commands/format.rb index 332f006..584ee23 100644 --- a/dim/lib/dim/commands/format.rb +++ b/dim/lib/dim/commands/format.rb @@ -86,8 +86,6 @@ def format_file(data) req.delete_if { |_key, value| value.nil? } - req.delete('test_setups') - %w[tags verification_methods refs].each do |e| req[e] = req[e].cleanUniqString if req.key?(e) && req[e].is_a?(String) end diff --git a/dim/lib/dim/consistency.rb b/dim/lib/dim/consistency.rb index 93aa0b1..139858e 100644 --- a/dim/lib/dim/consistency.rb +++ b/dim/lib/dim/consistency.rb @@ -46,37 +46,9 @@ def insert_default_values(req) def insert_property_file_definitions(ref) @loader.property_table.fetch(ref.document, {}).each do |attr, value| ref.data[attr] = value if ref.data[attr].nil? - - if attr == 'test_setups' && (ref.data['verification_methods'].nil? || ref.data['verification_methods'] == '') - ref.data['verification_methods'] = value - end end end - def merge_test_setups_and_verification_methods(ref) - return if ref.data.key?('verification_methods') && !ref.data['verification_methods'].nil? - - ref.data['verification_methods'] = ref.data['test_setups'].clone - end - - def calculate_test_setups(ref) - return unless ref.data['test_setups'].nil? - - tags = ref.data['tags'].cleanArray - - ref.data['test_setups'] = if ref.data['type'] != 'requirement' || tags.include?('process') - 'none' - elsif ref.category == 'input' || ref.category == 'unspecified' - 'none' - elsif ref.category == 'module' - 'off_target' - elsif tags.include?('tool') - 'off_target' - else - 'on_target' - end - end - def calculate_verification_methods(ref) return unless ref.data['verification_methods'].nil? @@ -106,7 +78,7 @@ def calculate_review_status(ref) end def clean_comma_separated(ref) - %w[tags developer tester refs test_setups verification_methods].each do |var| + %w[tags developer tester refs verification_methods].each do |var| ref.data[var] = ref.data[var].cleanString end end @@ -141,8 +113,6 @@ def check(allow_missing:) @loader.requirements.each do |_id, r| insert_property_file_definitions(r) insert_default_values(r) - merge_test_setups_and_verification_methods(r) - calculate_test_setups(r) calculate_verification_methods(r) calculate_review_status(r) calculate_developer_tester(r) diff --git a/dim/lib/dim/exporter/csv.rb b/dim/lib/dim/exporter/csv.rb index f6e82b0..862ff47 100644 --- a/dim/lib/dim/exporter/csv.rb +++ b/dim/lib/dim/exporter/csv.rb @@ -7,7 +7,6 @@ class Csv < ExporterInterface def header(content) @keys = @loader.all_attributes.keys - @keys.delete('test_setups') content.puts 'Sep=,' content.puts "id,document_name,originator,#{@keys.join(',')}" end diff --git a/dim/lib/dim/exporter/json.rb b/dim/lib/dim/exporter/json.rb index 4a58ffd..8de3b9c 100644 --- a/dim/lib/dim/exporter/json.rb +++ b/dim/lib/dim/exporter/json.rb @@ -15,8 +15,6 @@ def requirement(_f, r) vals = { 'id' => r.id, 'document_name' => r.document, 'originator' => r.origin } @loader.all_attributes.keys.each do |k| - next if k == 'test_setups' - v = r.data[k] v = v.cleanUniqArray.join(',') if k == 'refs' vals[k] = v.strip diff --git a/dim/lib/dim/loader.rb b/dim/lib/dim/loader.rb index d82b23e..343e337 100644 --- a/dim/lib/dim/loader.rb +++ b/dim/lib/dim/loader.rb @@ -399,9 +399,6 @@ def load_file(filename:, origin:, silent:, category:, disable_naming_convention_ else Dim::ExitHelper.exit(code: 1, filename: filename, msg: "attributes for id \"#{id}\" must be key-value pairs") end - unless attr.key?('verification_methods') - attr['verification_methods'] = attr['test_setups'] if attr.key?('test_setups') - end attr.each do |key, value| unless value.is_a?(String) Dim::ExitHelper.exit(code: 1, filename: filename, diff --git a/dim/lib/dim/requirement.rb b/dim/lib/dim/requirement.rb index 8dd652f..033eaae 100644 --- a/dim/lib/dim/requirement.rb +++ b/dim/lib/dim/requirement.rb @@ -29,9 +29,7 @@ class Requirement allowed: %w[QM CAL_1 CAL_2 CAL_3 CAL_4 not_set] }, 'developer' => { check: nil, format_style: :list, format_shift: 0, default: nil, allowed: nil }, 'tester' => { check: nil, format_style: :list, format_shift: 0, default: nil, allowed: nil }, - 'test_setups' => { check: :check_multi_enum, format_style: :multi, format_shift: 0, default: nil, - allowed: %w[none off_target on_target manual] }, - 'verification_methods' => { check: :check_multi_enum, format_style: :multi, format_shift: 0, default: nil, + 'verification_methods' => { check: :check_multi_enum, format_style: :multi, format_shift: 0, default: nil, allowed: %w[none off_target on_target manual] }, 'status' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: nil, allowed: %w[valid draft invalid] }, @@ -102,8 +100,6 @@ def initialize(id, document, filename, attr, origin, loader, category, line_numb check_unknown_keys check_invalid_values - # TODO: Remove after completely removing test_setups - merge_test_setups_and_verification_methods check_verification_methods end @@ -209,20 +205,6 @@ def check_invalid_values end end - def merge_test_setups_and_verification_methods - # Given verification_methods is empty - # Given test_setups contains None - # Then return None - ts = @data['test_setups']&.cleanArray || [] - vm = @data['verification_methods']&.cleanArray || [] - - return if vm.empty? && ts.empty? - - merged = ts.union(vm).join(', ') - @data['test_setups'] = merged - @data['verification_methods'] = merged - end - def check_verification_methods vm = @data['verification_methods']&.cleanArray || [] return unless vm.include?('none') && vm.length > 1 @@ -230,7 +212,7 @@ def check_verification_methods vm.delete('none') Dim::ExitHelper.exit(code: 1, filename: filename, - msg: "verification_methods or test_setups for \"#{@id}\" can't include 'none' along with #{vm.join(', ')}.") + msg: "verification_methods for \"#{@id}\" can't include 'none' along with #{vm.join(', ')}.") end end end diff --git a/dim/req/dim.dim b/dim/req/dim.dim index 26849bf..ce0448c 100644 --- a/dim/req/dim.dim +++ b/dim/req/dim.dim @@ -254,26 +254,6 @@ Dim_ReqFiles_tester: lib/dim/loader.rb, lib/dim/consistency.rb -Dim_ReqFiles_testSetups: - text: | - A requirements object shall have an optional "test_setups" attribute. - Allowed values: one or more of "none", "off_target", "on_target", "manual" - If test_setups is missing, it is resolved to: - - "none" if - - type is not "requirement" or - - "process" is in tags or - - category is "input" or "unspecified" - - "off_target" if - - category is "module" or - - tags include "tool" - - "on_target" otherwise - tags: tool, covered, tested - status: valid - sources: > - lib/dim/requirement.rb, - lib/dim/loader.rb, - lib/dim/consistency.rb - Dim_ReqFiles_verificationMethods: text: | A requirement object shall have an optional 'verification_methods' attribute. @@ -291,15 +271,6 @@ Dim_ReqFiles_verificationMethods: status: valid sources: lib/dim/requirement.rb lib/dim/loader.rb lib/dim/consistency.rb -Dim_ReqFiles_verificationMethods_backward: - text: | - "verification_methods" replaces "test_setups". - For backward compatibility, the requirements file can include both "test_setups" and "verification_methods". - During loading, Dim shall merge values from both attributes. - tags: tool, covered, tested - status: valid - sources: lib/dim/requirement.rb lib/dim/consistency.rb lib/dim/loader.rb - Dim_ReqFiles_status: text: | A requirements object shall have an optional "status" attribute. diff --git a/dim/spec/export_spec.rb b/dim/spec/export_spec.rb index bd579ec..ad5ebec 100644 --- a/dim/spec/export_spec.rb +++ b/dim/spec/export_spec.rb @@ -266,35 +266,6 @@ module Dim end end - context 'verification_methods' do - context 'to json' do - it 'shall not add test_setups in exported format', doc_refs: ['Dim_export_verificationMethods'] do - Test.main("export -i #{TEST_INPUT_DIR}/verification_methods/verification_methods.dim -o #{TEST_OUTPUT_DIR} -f json") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/output/verification_methods/Requirements.json") - actual = File.read("#{TEST_OUTPUT_DIR}/verification_method_test/Requirements.json") - expect(actual).to eq expected - end - end - - context 'to RST' do - it 'shall not add test_setups in exported output', doc_refs: ['Dim_export_verificationMethods'] do - Test.main("export -i #{TEST_INPUT_DIR}/verification_methods/verification_methods.dim -o #{TEST_OUTPUT_DIR} -f rst") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/output/verification_methods/Requirements.rst").universal_newline - actual = File.read("#{TEST_OUTPUT_DIR}/verification_method_test/Requirements.rst").universal_newline - expect(actual).to eq expected - end - end - - context 'to csv' do - it 'shall not add test_setups in exported output', doc_refs: ['Dim_export_verificationMethods'] do - Test.main("export -i #{TEST_INPUT_DIR}/verification_methods/verification_methods.dim -o #{TEST_OUTPUT_DIR} -f csv") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/output/verification_methods/Requirement.csv") - actual = File.read("#{TEST_OUTPUT_DIR}/verification_method_test/Requirements.csv") - expect(actual).to eq expected - end - end - end - context 'document' do context 'to json' do it 'shall replace module with document', doc_refs: %w[Dim_loading_document Dim_export_general] do diff --git a/dim/spec/format_spec.rb b/dim/spec/format_spec.rb index 3d7c5d9..1e124b0 100644 --- a/dim/spec/format_spec.rb +++ b/dim/spec/format_spec.rb @@ -114,7 +114,6 @@ def compareFormat(f) it 'multi enums', doc_refs: %w[Dim_format_whitespaces Dim_format_default Dim_format_duplicated] do compareFormat('collection/tags.dim') - compareFormat('collection/test_setups.dim') compareFormat('collection/verification_methods.dim') end @@ -152,31 +151,6 @@ def compareFormat(f) end end - context 'shall not include test_setups' do - it 'shall format the document with verification_methods and not test_setups', - doc_refs: %w[Dim_format_verificationMethods] do - Test.main("format -i #{TEST_INPUT_DIR}/verification_methods/verification_methods.dim --output-format extra") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/verification_methods.dim.expected") - actual = File.read("#{TEST_INPUT_DIR}/verification_methods/verification_methods.dim.formatted") - expect(actual).to eq expected - - Test.main("format -i #{TEST_INPUT_DIR}/verification_methods/single_none.dim --output-format extra") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/single_none.dim.expected") - actual = File.read("#{TEST_INPUT_DIR}/verification_methods/single_none.dim.formatted") - expect(actual).to eq expected - - Test.main("format -i #{TEST_INPUT_DIR}/verification_methods/all_none.dim --output-format extra") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/all_none.dim.expected") - actual = File.read("#{TEST_INPUT_DIR}/verification_methods/all_none.dim.formatted") - expect(actual).to eq expected - - Test.main("format -i #{TEST_INPUT_DIR}/verification_methods/single_none.dim --output-format extra") - expected = File.read("#{TEST_INPUT_DIR}/verification_methods/single_none.dim.expected") - actual = File.read("#{TEST_INPUT_DIR}/verification_methods/single_none.dim.formatted") - expect(actual).to eq expected - end - end - context 'shall ignore different line-endings:' do it 'LF compared to OS default', doc_refs: ['Dim_format_checkOnly'] do content = File.read("#{TEST_INPUT_DIR}/format_lineendings/lf.dim", mode: 'rb') diff --git a/dim/spec/property_spec.rb b/dim/spec/property_spec.rb index b37a264..b0cac42 100644 --- a/dim/spec/property_spec.rb +++ b/dim/spec/property_spec.rb @@ -73,7 +73,6 @@ module Dim expect(loader.requirements['test_module_for_insertion_empty'].data['tags']).to eql 'legal, sys' expect(loader.requirements['test_module_for_insertion_empty'].data['developer']).to eql 'inserted developer' expect(loader.requirements['test_module_for_insertion_empty'].data['tester']).to eql 'inserted tester' - expect(loader.requirements['test_module_for_insertion_empty'].data['test_setups']).to eql 'manual' expect(loader.requirements['test_module_for_insertion_empty'].data['verification_methods']).to eql 'manual' expect(loader.requirements['test_module_for_insertion_empty'].data['status']).to eql 'valid' expect(loader.requirements['test_module_for_insertion_empty'].data['review_status']).to eql 'rejected' @@ -91,7 +90,6 @@ module Dim expect(loader.requirements['test_module_for_insertion_not_empty'].data['change_request']).to eql 'test_CR' expect(loader.requirements['test_module_for_insertion_not_empty'].data['tags']).to eql 'swa' expect(loader.requirements['test_module_for_insertion_not_empty'].data['developer']).to eql 'test_developer' - expect(loader.requirements['test_module_for_insertion_not_empty'].data['test_setups']).to eql 'none' expect(loader.requirements['test_module_for_insertion_not_empty'].data['verification_methods']).to eql 'none' expect(loader.requirements['test_module_for_insertion_not_empty'].data['status']).to eql 'invalid' expect(loader.requirements['test_module_for_insertion_not_empty'].data['review_status']).to eql 'unclear' diff --git a/dim/spec/requirement_spec.rb b/dim/spec/requirement_spec.rb index 665bf8f..eb55cdd 100644 --- a/dim/spec/requirement_spec.rb +++ b/dim/spec/requirement_spec.rb @@ -581,208 +581,94 @@ module Dim end end - context 'test_setups' do - it 'shall be any string', doc_refs: ['Dim_ReqFiles_testSetups'] do + context 'verification_methods' do + it 'shall be any string', doc_refs: ['Dim_ReqFiles_verificationMethods'] do loader = Dim::Loader.new - loader.load(file: "#{TEST_INPUT_DIR}/reqs/ts/valid.dim") + loader.load(file: "#{TEST_INPUT_DIR}/reqs/vm/valid.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(loader.requirements['id_v1'].test_setups).to eq ['none'] - expect(loader.requirements['id_v2'].test_setups).to match_array(%w[off_target on_target manual]) + expect(loader.requirements['id_v1'].verification_methods).to eq ['none'] + expect(loader.requirements['id_v2'].verification_methods).to match_array(%w[off_target on_target manual]) end - it 'shall resolve default', doc_refs: ['Dim_ReqFiles_testSetups'] do + it 'shall resolve default', doc_refs: ['Dim_ReqFiles_verificationMethods'] do # category set (config loaded) lc = Dim::Loader.new - lc.load(file: "#{TEST_INPUT_DIR}/reqs/ts/resolve_config.dim") - expect(Dim::ExitHelper.exit_code).to eq 0 - expect(lc.requirements['input_r'].test_setups).to eql ['none'] - expect(lc.requirements['input_i'].test_setups).to eql ['none'] - expect(lc.requirements['input_p'].test_setups).to eql ['none'] - expect(lc.requirements['input_t'].test_setups).to eql ['none'] - expect(lc.requirements['module_r'].test_setups).to eql ['off_target'] - expect(lc.requirements['module_i'].test_setups).to eql ['none'] - expect(lc.requirements['module_p'].test_setups).to eql ['none'] - expect(lc.requirements['module_t'].test_setups).to eql ['off_target'] - expect(lc.requirements['software_r'].test_setups).to eql ['on_target'] - expect(lc.requirements['software_i'].test_setups).to eql ['none'] - expect(lc.requirements['software_p'].test_setups).to eql ['none'] - expect(lc.requirements['software_t'].test_setups).to eql ['off_target'] + lc.load(file: "#{TEST_INPUT_DIR}/reqs/vm/resolve_config.dim") + expect(Dim::ExitHelper.exit_code).to eq 0 + expect(lc.requirements['input_r'].verification_methods).to eql ['none'] + expect(lc.requirements['input_i'].verification_methods).to eql ['none'] + expect(lc.requirements['input_p'].verification_methods).to eql ['none'] + expect(lc.requirements['input_t'].verification_methods).to eql ['none'] + expect(lc.requirements['module_r'].verification_methods).to eql ['off_target'] + expect(lc.requirements['module_i'].verification_methods).to eql ['none'] + expect(lc.requirements['module_p'].verification_methods).to eql ['none'] + expect(lc.requirements['module_t'].verification_methods).to eql ['off_target'] + expect(lc.requirements['software_r'].verification_methods).to eql ['on_target'] + expect(lc.requirements['software_i'].verification_methods).to eql ['none'] + expect(lc.requirements['software_p'].verification_methods).to eql ['none'] + expect(lc.requirements['software_t'].verification_methods).to eql ['off_target'] # category unspecified lm = Dim::Loader.new - lm.load(file: "#{TEST_INPUT_DIR}/reqs/ts/resolve_module.dim") + lm.load(file: "#{TEST_INPUT_DIR}/reqs/vm/resolve_module.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(lm.requirements['module_r'].test_setups).to eql ['none'] - expect(lm.requirements['module_i'].test_setups).to eql ['none'] - expect(lm.requirements['module_p'].test_setups).to eql ['none'] - expect(lm.requirements['module_t'].test_setups).to eql ['none'] + expect(lm.requirements['module_r'].verification_methods).to eql ['none'] + expect(lm.requirements['module_i'].verification_methods).to eql ['none'] + expect(lm.requirements['module_p'].verification_methods).to eql ['none'] + expect(lm.requirements['module_t'].verification_methods).to eql ['none'] ls = Dim::Loader.new - ls.load(file: "#{TEST_INPUT_DIR}/reqs/ts/resolve_software.dim") + ls.load(file: "#{TEST_INPUT_DIR}/reqs/vm/resolve_software.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(ls.requirements['software_r'].test_setups).to eql ['none'] - expect(ls.requirements['software_i'].test_setups).to eql ['none'] - expect(ls.requirements['software_p'].test_setups).to eql ['none'] - expect(ls.requirements['software_t'].test_setups).to eql ['none'] + expect(ls.requirements['software_r'].verification_methods).to eql ['none'] + expect(ls.requirements['software_i'].verification_methods).to eql ['none'] + expect(ls.requirements['software_p'].verification_methods).to eql ['none'] + expect(ls.requirements['software_t'].verification_methods).to eql ['none'] end - it 'shall be nil by default', doc_refs: ['Dim_ReqFiles_testSetups'] do + it 'shall be nil by default', doc_refs: ['Dim_ReqFiles_verificationMethods'] do loader = Dim::Loader.new - loader.load(file: "#{TEST_INPUT_DIR}/reqs/ts/default.dim") + loader.load(file: "#{TEST_INPUT_DIR}/reqs/vm/default.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(loader.requirements['id_d'].test_setups).to eq ['none'] + expect(loader.requirements['id_d'].verification_methods).to eq ['none'] loader = Dim::Loader.new - loader.load(file: "#{TEST_INPUT_DIR}/reqs/ts/default_config.dim") + loader.load(file: "#{TEST_INPUT_DIR}/reqs/vm/default_config.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(loader.requirements['id_d'].test_setups).to eq ['off_target'] + expect(loader.requirements['id_d'].verification_methods).to eq ['off_target'] end it 'shall throw an error and print a meaningful error message if value is no string', - doc_refs: ['Dim_ReqFiles_testSetups'] do - Test.main("check -i #{TEST_INPUT_DIR}/reqs/ts/invalid_type.dim") + doc_refs: ['Dim_ReqFiles_verificationMethods'] do + Test.main("check -i #{TEST_INPUT_DIR}/reqs/vm/invalid_type.dim") expect(Dim::ExitHelper.exit_code).to eq 1 - expect(@test_stderr).to include 'value of attribute "test_setups" must be String not Array' - expect(@test_stderr).to include 'Error: in spec/test_input/reqs/ts/invalid_type.dim:' + expect(@test_stderr).to include 'value of attribute "verification_methods" must be String not Array' + expect(@test_stderr).to include 'Error: in spec/test_input/reqs/vm/invalid_type.dim:' end - it 'with duplicates shall not throw an error but duplicates are removed', doc_refs: ['Dim_ReqFiles_testSetups'] do + it 'with duplicates shall not throw an error but duplicates are removed', doc_refs: ['Dim_ReqFiles_verificationMethods'] do loader = Dim::Loader.new - loader.load(file: "#{TEST_INPUT_DIR}/reqs/ts/duplicate.dim") + loader.load(file: "#{TEST_INPUT_DIR}/reqs/vm/duplicate.dim") expect(Dim::ExitHelper.exit_code).to eq 0 - expect(loader.requirements['id_duplicate'].test_setups).to match_array(%w[off_target on_target]) + expect(loader.requirements['id_duplicate'].verification_methods).to match_array(%w[off_target on_target]) end - it 'unknown shall throw an error and print a meaningful error message', doc_refs: ['Dim_ReqFiles_testSetups'] do - Test.main("check -i #{TEST_INPUT_DIR}/reqs/ts/unknown.dim") + it 'unknown shall throw an error and print a meaningful error message', doc_refs: ['Dim_ReqFiles_verificationMethods'] do + Test.main("check -i #{TEST_INPUT_DIR}/reqs/vm/unknown.dim") expect(Dim::ExitHelper.exit_code).to be > 0 - expect(@test_stderr).to include ' attribute "test_setups" is invalid: "unknown" (id: id_unknown). "test_setups" must be one or more of "none", "off_target", "on_target", "manual".' - expect(@test_stderr).to include 'Error: in spec/test_input/reqs/ts/unknown.dim:' + expect(@test_stderr).to include ' attribute "verification_methods" is invalid: "unknown" (id: id_unknown). "verification_methods" must be one or more of "none", "off_target", "on_target", "manual".' + expect(@test_stderr).to include 'Error: in spec/test_input/reqs/vm/unknown.dim:' end - it 'shall throw error when empty value is set', doc_refs: ['Dim_ReqFiles_testSetups'] do - Test.main("check -i #{TEST_INPUT_DIR}/reqs/ts/empty.dim") + it 'shall throw error when empty value is set', doc_refs: ['Dim_ReqFiles_verificationMethods'] do + Test.main("check -i #{TEST_INPUT_DIR}/reqs/vm/empty.dim") expect(Dim::ExitHelper.exit_code).to be 1 - expect(@test_stderr).to include 'attribute "test_setups" is invalid: "" (id: id_d). "test_setups" must be one or more of "none", "off_target", "on_target", "manual".' + expect(@test_stderr).to include 'attribute "verification_methods" is invalid: "" (id: id_d). "verification_methods" must be one or more of "none", "off_target", "on_target", "manual".' end it 'shall throw an error and print a meaningful error message if none is used with another enum value', - doc_refs: ['Dim_ReqFiles_testSetups'] do - Test.main("check -i #{TEST_INPUT_DIR}/reqs/ts/combined_none.dim") + doc_refs: ['Dim_ReqFiles_verificationMethods'] do + Test.main("check -i #{TEST_INPUT_DIR}/reqs/vm/combined_none.dim") expect(Dim::ExitHelper.exit_code).to be > 0 - expect(@test_stderr).to include "verification_methods or test_setups for \"test_id_1\" can't include 'none' along with on_target" - expect(@test_stderr).to include 'Error: in spec/test_input/reqs/ts/combined_none.dim:' - end - end - - context 'verification_methods' do - context 'when Dim file contains valid data' do - let(:loader) { Dim::Loader.new } - - before do - loader.load(file: 'spec/test_input/verification_methods/verification_methods.dim') - end - - context 'when verification_methods and test_setups are empty in dim file' do - let(:requirement) { loader.requirements['ID_1'] } - - it 'shall have test_setups and verification_methods set to none', - doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - expect(requirement.test_setups).to match_array ['none'] - expect(requirement.data['test_setups']).to eq 'none' - - expect(requirement.verification_methods).to match_array ['none'] - expect(requirement.data['verification_methods']).to eq 'none' - end - end - - context 'when verification_methods present in the Dim file while test_setups is missing' do - let(:requirement_2) { loader.requirements['ID_2'] } - let(:requirement_3) { loader.requirements['ID_3'] } - let(:requirement_4) { loader.requirements['ID_4'] } - - let(:expected_array) { %w[off_target on_target] } - - it 'shall return test_setups same as verification_methods', - doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - expect(requirement_2.test_setups).to match_array expected_array - expect(requirement_2.verification_methods).to match_array expected_array - - expect(requirement_3.test_setups).to match_array ['off_target'] - expect(requirement_3.verification_methods).to match_array ['off_target'] - - expect(requirement_4.test_setups).to match_array expected_array - expect(requirement_4.verification_methods).to match_array expected_array - - expect(requirement_2.data['test_setups']).to eq 'off_target, on_target' - expect(requirement_2.data['verification_methods']).to eq 'off_target, on_target' - - expect(requirement_3.data['test_setups']).to eq 'off_target' - expect(requirement_3.data['verification_methods']).to eq 'off_target' - - expect(requirement_4.data['test_setups']).to eq 'off_target, on_target' - expect(requirement_4.data['verification_methods']).to eq 'off_target, on_target' - end - end - - context 'when verification_methods is missing from Dim file and test_setups are present' do - let(:requirement) { loader.requirements['ID_5'] } - - it 'shall have values from test_setups added to verification_methods', - doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - expect(requirement.test_setups).to match_array %w[manual off_target on_target] - expect(requirement.verification_methods).to match_array %w[manual off_target on_target] - - expect(requirement.data['test_setups']).to eq 'off_target, on_target, manual' - expect(requirement.data['verification_methods']).to eq 'off_target, on_target, manual' - end - end - end - - context 'when verification_methods contains none and test_setups is present in the Dim file' do - it 'shall throw an error with the meaningful error message', - doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - Test.main("check -i spec/test_input/verification_methods/none_verification_methods.dim") - - expect(Dim::ExitHelper.exit_code).to be 1 - expect(@test_stderr).to include("test_setups for \"ID_1\" can't include 'none' along with off_target") - end - end - - context 'when verification_methods are present in Dim and test_setups is none' do - it 'shall throw an error with a meaningful error message', - doc_refs: %w[Dim_ReqFiles_verificationMethods_backward Dim_ReqFiles_verificationMethods] do - Test.main("check -i spec/test_input/verification_methods/none_test_setups.dim") - - expect(Dim::ExitHelper.exit_code).to eq 1 - expect(@test_stderr).to include("verification_methods or test_setups for \"ID_1\" can't include 'none' along with off_target") - end - end - - context 'when verification_methods and test_setups in Dim contains none' do - let(:loader) { Dim::Loader.new } - let(:requirement) { loader.requirements['ID_1'] } - - before do - loader.load(file: 'spec/test_input/verification_methods/all_none.dim') - end - - it 'shall load Dim', doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - expect(requirement.test_setups).to match_array ['none'] - expect(requirement.verification_methods).to match_array ['none'] - end - end - - context 'when test_setups is none or verification_methods is none' do - it 'shall load dim file', doc_refs: %w[Dim_ReqFiles_verificationMethods Dim_ReqFiles_verificationMethods_backward] do - loader = Dim::Loader.new - loader.load(file: 'spec/test_input/verification_methods/single_none.dim') - - expect(loader.requirements['ID_1'].test_setups).to eq ['none'] - expect(loader.requirements['ID_1'].verification_methods).to eq ['none'] - expect(loader.requirements['ID_1'].data['test_setups']).to eq 'none' - expect(loader.requirements['ID_1'].data['verification_methods']).to eq 'none' - - expect(loader.requirements['ID_2'].test_setups).to eq ['none'] - expect(loader.requirements['ID_2'].verification_methods).to eq ['none'] - end + expect(@test_stderr).to include "verification_methods for \"test_id_1\" can't include 'none' along with on_target" + expect(@test_stderr).to include 'Error: in spec/test_input/reqs/vm/combined_none.dim:' end end diff --git a/dim/spec/test_input/convenience/module_ok.dim b/dim/spec/test_input/convenience/module_ok.dim index 03da524..8a83b31 100644 --- a/dim/spec/test_input/convenience/module_ok.dim +++ b/dim/spec/test_input/convenience/module_ok.dim @@ -3,65 +3,65 @@ module: ok ESR_Test_L3a: text: xy tags: covered - test_setups: none + verification_methods: none ESR_Test_L3b: text: xy tags: covered, tested - test_setups: off_target + verification_methods: off_target ESR_Test_L3c: text: xy tags: covered, tested - test_setups: off_target + verification_methods: off_target ESR_Test_L3d: tags: process text: xy - test_setups: off_target + verification_methods: off_target ESR_Test_L3e: tags: covered text: xy - test_setups: off_target + verification_methods: off_target ESR_Test_L2ab: text: xy tags: covered, tested refs: ESR_Test_L3a, ESR_Test_L3b - test_setups: off_target + verification_methods: off_target ESR_Test_L2bc: text: xy refs: ESR_Test_L3b, ESR_Test_L3c - test_setups: off_target + verification_methods: off_target ESR_Test_L2cd: text: xy tags: covered, tested refs: ESR_Test_L3c, ESR_Test_L3d - test_setups: off_target + verification_methods: off_target ESR_Test_L2ce: text: xy tags: covered, tested refs: ESR_Test_L3c, ESR_Test_L3e - test_setups: off_target + verification_methods: off_target ESR_Test_L1abc: text: xy tags: covered, tested refs: ESR_Test_L2ab, ESR_Test_L2bc - test_setups: off_target + verification_methods: off_target ESR_Test_L1bcd: text: xy tags: covered, tested refs: ESR_Test_L2bc, ESR_Test_L2cd - test_setups: off_target + verification_methods: off_target ESR_Test_L0abcd: text: xy tags: covered, tested refs: ESR_Test_L1abc, ESR_Test_L1bcd - test_setups: off_target + verification_methods: off_target diff --git a/dim/spec/test_input/export_calculated_infos/Input1.yml b/dim/spec/test_input/export_calculated_infos/Input1.yml index b8be17a..a97858a 100644 --- a/dim/spec/test_input/export_calculated_infos/Input1.yml +++ b/dim/spec/test_input/export_calculated_infos/Input1.yml @@ -18,12 +18,12 @@ SRS_ABC123_req5: h3 HEADING3 SRS_ABC123_req6: text: Text6 - test_setups: on_target + verification_methods: on_target verification_criteria: Bla review_status: accepted SRS_ABC123_req7: text: Text7 - test_setups: on_target + verification_methods: on_target verification_criteria: Bla review_status: accepted tags: covered @@ -31,6 +31,6 @@ SRS_ABC123_req7: SRS_ABC123_req8: text: Text8 developer: CompanyName - test_setups: on_target + verification_methods: on_target review_status: unclear tags: tested diff --git a/dim/spec/test_input/export_check/export_test_12_1.dim b/dim/spec/test_input/export_check/export_test_12_1.dim index 56b6c8c..10b0d76 100644 --- a/dim/spec/test_input/export_check/export_test_12_1.dim +++ b/dim/spec/test_input/export_check/export_test_12_1.dim @@ -6,7 +6,7 @@ export_1: feature: Blah change_request: Fasel verification_criteria: Value xy shall equal value ab. - test_setups: on_target, off_target + verification_methods: on_target, off_target miscellaneous: Additional random information comment: Req is nice asil: ASIL_A diff --git a/dim/spec/test_input/export_check/export_test_12_2.dim b/dim/spec/test_input/export_check/export_test_12_2.dim index de5e155..163cd49 100644 --- a/dim/spec/test_input/export_check/export_test_12_2.dim +++ b/dim/spec/test_input/export_check/export_test_12_2.dim @@ -6,7 +6,7 @@ export_2: feature: Blah change_request: Fasel verification_criteria: Value xy shall equal value ab. - test_setups: on_target, off_target + verification_methods: on_target, off_target miscellaneous: Additional random information comment: Req is nice asil: ASIL_A diff --git a/dim/spec/test_input/export_check/no_check_enclosed.dim b/dim/spec/test_input/export_check/no_check_enclosed.dim index 66f563f..56aff85 100644 --- a/dim/spec/test_input/export_check/no_check_enclosed.dim +++ b/dim/spec/test_input/export_check/no_check_enclosed.dim @@ -7,7 +7,7 @@ no_check_1: feature: Blah change_request: Fasel verification_criteria: Value xy shall equal value ab. - test_setups: on_target, off_target + verification_methods: on_target, off_target miscellaneous: Additional random information comment: Req is nice asil: ASIL_A diff --git a/dim/spec/test_input/export_check/test_export_06.dim b/dim/spec/test_input/export_check/test_export_06.dim index 4e9e916..92a6790 100644 --- a/dim/spec/test_input/export_check/test_export_06.dim +++ b/dim/spec/test_input/export_check/test_export_06.dim @@ -1,5 +1,5 @@ module: mod06 Test_Export_06: - test_setups: none + verification_methods: none developer: X diff --git a/dim/spec/test_input/export_check/test_export_07.dim b/dim/spec/test_input/export_check/test_export_07.dim index 5968937..3786e40 100644 --- a/dim/spec/test_input/export_check/test_export_07.dim +++ b/dim/spec/test_input/export_check/test_export_07.dim @@ -1,5 +1,5 @@ module: mod07 Test_Export_07: - test_setups: none + verification_methods: none tester: X diff --git a/dim/spec/test_input/export_check/test_export_08.dim b/dim/spec/test_input/export_check/test_export_08.dim index 3b4e81b..bb6e7b8 100644 --- a/dim/spec/test_input/export_check/test_export_08.dim +++ b/dim/spec/test_input/export_check/test_export_08.dim @@ -1,5 +1,5 @@ module: mod08 Test_Export_08: - test_setups: none + verification_methods: none tester: X diff --git a/dim/spec/test_input/export_check/test_export_09.dim b/dim/spec/test_input/export_check/test_export_09.dim index ea770db..1c415be 100644 --- a/dim/spec/test_input/export_check/test_export_09.dim +++ b/dim/spec/test_input/export_check/test_export_09.dim @@ -1,5 +1,5 @@ module: mod09 Test_Export_09: - test_setups: none + verification_methods: none developer: X diff --git a/dim/spec/test_input/export_check/test_export_10.dim b/dim/spec/test_input/export_check/test_export_10.dim index 0f08155..b9f8c45 100644 --- a/dim/spec/test_input/export_check/test_export_10.dim +++ b/dim/spec/test_input/export_check/test_export_10.dim @@ -1,4 +1,4 @@ module: mod10 Test_Export_10: - test_setups: none + verification_methods: none diff --git a/dim/spec/test_input/export_check/test_export_11.dim b/dim/spec/test_input/export_check/test_export_11.dim index 430b450..5c00e8c 100644 --- a/dim/spec/test_input/export_check/test_export_11.dim +++ b/dim/spec/test_input/export_check/test_export_11.dim @@ -1,7 +1,7 @@ module: mod11 Test_Export_11: - test_setups: off_target + verification_methods: off_target developer: | A B diff --git a/dim/spec/test_input/export_check/test_module_1.dim b/dim/spec/test_input/export_check/test_module_1.dim index 47b51a9..f0b1144 100644 --- a/dim/spec/test_input/export_check/test_module_1.dim +++ b/dim/spec/test_input/export_check/test_module_1.dim @@ -6,7 +6,7 @@ test_id_1: feature: Blah change_request: Fasel verification_criteria: Value xy shall equal value ab. - test_setups: on_target, off_target + verification_methods: on_target, off_target miscellaneous: Additional random information comment: Req is nice asil: ASIL_A diff --git a/dim/spec/test_input/format/collection/order.dim b/dim/spec/test_input/format/collection/order.dim index 6c75d73..bbdd130 100644 --- a/dim/spec/test_input/format/collection/order.dim +++ b/dim/spec/test_input/format/collection/order.dim @@ -18,7 +18,7 @@ REQ1: tags: memory text_french: fr text_german: gr - test_setups: on_target + verification_methods: on_target review_status: unclear verification_criteria_german: vgr comment_german: cgr diff --git a/dim/spec/test_input/format/collection/test_setups.dim b/dim/spec/test_input/format/collection/test_setups.dim deleted file mode 100644 index 10ab22d..0000000 --- a/dim/spec/test_input/format/collection/test_setups.dim +++ /dev/null @@ -1,11 +0,0 @@ -module: test_setup - -TS_R1: -TS_R2: -TS_R3: - test_setups: off_target,off_target -TS_R4: - test_setups: off_target -TS_R5: - test_setups: | - off_target,off_target,on_target,on_target diff --git a/dim/spec/test_input/format/collection/test_setups.dim.expected b/dim/spec/test_input/format/collection/test_setups.dim.expected deleted file mode 100644 index eaf15b7..0000000 --- a/dim/spec/test_input/format/collection/test_setups.dim.expected +++ /dev/null @@ -1,14 +0,0 @@ -document: test_setup - -TS_R1: - -TS_R2: - -TS_R3: - verification_methods: off_target - -TS_R4: - verification_methods: off_target - -TS_R5: - verification_methods: off_target, on_target diff --git a/dim/spec/test_input/invalid_input/modules/test_module_1.dim b/dim/spec/test_input/invalid_input/modules/test_module_1.dim index 2db0ee9..715257e 100644 --- a/dim/spec/test_input/invalid_input/modules/test_module_1.dim +++ b/dim/spec/test_input/invalid_input/modules/test_module_1.dim @@ -5,7 +5,7 @@ test_id_1: tags: established, process, covered, tested feature: Blah verification_criteria: Value xy shall equal value ab. - test_setups: on_target, off_target + verification_methods: on_target, off_target miscellaneous: Additional random information comment: Req is nice asil: ASIL_A diff --git a/dim/spec/test_input/no_tester/test_module_1.dim b/dim/spec/test_input/no_tester/test_module_1.dim index 4e0a992..6eabac0 100644 --- a/dim/spec/test_input/no_tester/test_module_1.dim +++ b/dim/spec/test_input/no_tester/test_module_1.dim @@ -2,5 +2,5 @@ module: test_module_1 test_id_1: text: First test requirement - test_setups: on_target + verification_methods: on_target tester: '' \ No newline at end of file diff --git a/dim/spec/test_input/prefix_check/req/test_module_3.dim b/dim/spec/test_input/prefix_check/req/test_module_3.dim index 157e59a..f1d4d37 100644 --- a/dim/spec/test_input/prefix_check/req/test_module_3.dim +++ b/dim/spec/test_input/prefix_check/req/test_module_3.dim @@ -1,4 +1,4 @@ ESR-0007-0565: text: test requirement verification_criteria: xy shall be ab - test_setups: on_target + verification_methods: on_target diff --git a/dim/spec/test_input/prefix_check/test_module_1.dim b/dim/spec/test_input/prefix_check/test_module_1.dim index 997035d..3b71580 100644 --- a/dim/spec/test_input/prefix_check/test_module_1.dim +++ b/dim/spec/test_input/prefix_check/test_module_1.dim @@ -3,4 +3,4 @@ module: test1-test ESR-0007-0565: text: test requirement verification_criteria: xy shall be ab - test_setups: on_target + verification_methods: on_target diff --git a/dim/spec/test_input/prefix_check/test_module_2.dim b/dim/spec/test_input/prefix_check/test_module_2.dim index 157e59a..f1d4d37 100644 --- a/dim/spec/test_input/prefix_check/test_module_2.dim +++ b/dim/spec/test_input/prefix_check/test_module_2.dim @@ -1,4 +1,4 @@ ESR-0007-0565: text: test requirement verification_criteria: xy shall be ab - test_setups: on_target + verification_methods: on_target diff --git a/dim/spec/test_input/property_file_insertion/properties.yaml b/dim/spec/test_input/property_file_insertion/properties.yaml index d93f59c..201dc93 100644 --- a/dim/spec/test_input/property_file_insertion/properties.yaml +++ b/dim/spec/test_input/property_file_insertion/properties.yaml @@ -8,7 +8,7 @@ test_module_for_insertion: tags: legal, sys developer: inserted developer tester: inserted tester - test_setups: manual + verification_methods: manual status: valid review_status: rejected comment: inserted comment diff --git a/dim/spec/test_input/property_file_insertion/test_module_for_insertion.dim b/dim/spec/test_input/property_file_insertion/test_module_for_insertion.dim index ba8123c..8fc2103 100644 --- a/dim/spec/test_input/property_file_insertion/test_module_for_insertion.dim +++ b/dim/spec/test_input/property_file_insertion/test_module_for_insertion.dim @@ -12,7 +12,7 @@ test_module_for_insertion_not_empty: tags: swa developer: test_developer tester: test_tester - test_setups: none + verification_methods: none status: invalid review_status: unclear comment: test_comment diff --git a/dim/spec/test_input/property_file_insertion/test_setups/properties.yaml b/dim/spec/test_input/property_file_insertion/test_setups/properties.yaml index a00d07a..a913f12 100644 --- a/dim/spec/test_input/property_file_insertion/test_setups/properties.yaml +++ b/dim/spec/test_input/property_file_insertion/test_setups/properties.yaml @@ -1,2 +1,2 @@ test_setups_insertion: - test_setups: off_target + verification_methods: off_target diff --git a/dim/spec/test_input/reqs/ts/duplicate.dim b/dim/spec/test_input/reqs/ts/duplicate.dim deleted file mode 100644 index f3b93bd..0000000 --- a/dim/spec/test_input/reqs/ts/duplicate.dim +++ /dev/null @@ -1,4 +0,0 @@ -module: Name1 - -id_duplicate: - test_setups: off_target, on_target, off_target diff --git a/dim/spec/test_input/reqs/ts/empty.dim b/dim/spec/test_input/reqs/ts/empty.dim deleted file mode 100644 index bed2765..0000000 --- a/dim/spec/test_input/reqs/ts/empty.dim +++ /dev/null @@ -1,4 +0,0 @@ -module: Name1 - -id_d: - test_setups: \ No newline at end of file diff --git a/dim/spec/test_input/reqs/ts/invalid_type.dim b/dim/spec/test_input/reqs/ts/invalid_type.dim deleted file mode 100644 index 3481924..0000000 --- a/dim/spec/test_input/reqs/ts/invalid_type.dim +++ /dev/null @@ -1,6 +0,0 @@ -module: Name1 - -id_v: - test_setups: - - Invalid - - Type diff --git a/dim/spec/test_input/reqs/ts/unknown.dim b/dim/spec/test_input/reqs/ts/unknown.dim deleted file mode 100644 index a042d28..0000000 --- a/dim/spec/test_input/reqs/ts/unknown.dim +++ /dev/null @@ -1,4 +0,0 @@ -module: Name1 - -id_unknown: - test_setups: unknown diff --git a/dim/spec/test_input/reqs/ts/valid.dim b/dim/spec/test_input/reqs/ts/valid.dim deleted file mode 100644 index b559f40..0000000 --- a/dim/spec/test_input/reqs/ts/valid.dim +++ /dev/null @@ -1,7 +0,0 @@ -module: Name1 - -id_v1: - test_setups: none - -id_v2: - test_setups: off_target, on_target, manual diff --git a/dim/spec/test_input/reqs/ts/combined_none.dim b/dim/spec/test_input/reqs/vm/combined_none.dim similarity index 53% rename from dim/spec/test_input/reqs/ts/combined_none.dim rename to dim/spec/test_input/reqs/vm/combined_none.dim index 67a8048..8d43050 100644 --- a/dim/spec/test_input/reqs/ts/combined_none.dim +++ b/dim/spec/test_input/reqs/vm/combined_none.dim @@ -2,4 +2,4 @@ module: test test_id_1: text: test_value - test_setups: none, on_target \ No newline at end of file + verification_methods: none, on_target \ No newline at end of file diff --git a/dim/spec/test_input/reqs/ts/default.dim b/dim/spec/test_input/reqs/vm/default.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/default.dim rename to dim/spec/test_input/reqs/vm/default.dim diff --git a/dim/spec/test_input/reqs/ts/default_config.dim b/dim/spec/test_input/reqs/vm/default_config.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/default_config.dim rename to dim/spec/test_input/reqs/vm/default_config.dim diff --git a/dim/spec/test_input/reqs/vm/duplicate.dim b/dim/spec/test_input/reqs/vm/duplicate.dim new file mode 100644 index 0000000..b96207d --- /dev/null +++ b/dim/spec/test_input/reqs/vm/duplicate.dim @@ -0,0 +1,4 @@ +module: Name1 + +id_duplicate: + verification_methods: off_target, on_target, off_target diff --git a/dim/spec/test_input/reqs/vm/empty.dim b/dim/spec/test_input/reqs/vm/empty.dim new file mode 100644 index 0000000..6248cd7 --- /dev/null +++ b/dim/spec/test_input/reqs/vm/empty.dim @@ -0,0 +1,4 @@ +module: Name1 + +id_d: + verification_methods: \ No newline at end of file diff --git a/dim/spec/test_input/reqs/vm/invalid_type.dim b/dim/spec/test_input/reqs/vm/invalid_type.dim new file mode 100644 index 0000000..d176ca3 --- /dev/null +++ b/dim/spec/test_input/reqs/vm/invalid_type.dim @@ -0,0 +1,6 @@ +module: Name1 + +id_v: + verification_methods: + - Invalid + - Type diff --git a/dim/spec/test_input/verification_methods/output/verification_methods/Requirement.csv b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirement.csv similarity index 74% rename from dim/spec/test_input/verification_methods/output/verification_methods/Requirement.csv rename to dim/spec/test_input/reqs/vm/output/verification_methods/Requirement.csv index c1af673..95e535c 100644 --- a/dim/spec/test_input/verification_methods/output/verification_methods/Requirement.csv +++ b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirement.csv @@ -1,6 +1,6 @@ Sep=, id,document_name,originator,type,text,verification_criteria,feature,change_request,tags,asil,cal,developer,tester,verification_methods,status,review_status,comment,miscellaneous,sources,refs -"ID_1","verification_method_test","","requirement","Dim file should allow only verification_methods attribute, but when test_setups method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file","","","","","not_set","not_set","","","none","draft","not_reviewed","","","","" +"ID_1","verification_method_test","","requirement","Dim file should allow only verification_methods attribute, but when verification_methods method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file","","","","","not_set","not_set","","","none","draft","not_reviewed","","","","" "ID_2","verification_method_test","","requirement","","","","","","not_set","not_set","","","off_target, on_target","draft","not_reviewed","","","","" "ID_3","verification_method_test","","requirement","","","","","","not_set","not_set","","","off_target","draft","not_reviewed","","","","" "ID_4","verification_method_test","","requirement","","","","","","not_set","not_set","","","off_target, on_target","draft","not_reviewed","","","","" diff --git a/dim/spec/test_input/verification_methods/output/verification_methods/Requirements.json b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.json similarity index 93% rename from dim/spec/test_input/verification_methods/output/verification_methods/Requirements.json rename to dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.json index 26ac757..74ed29e 100644 --- a/dim/spec/test_input/verification_methods/output/verification_methods/Requirements.json +++ b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.json @@ -4,7 +4,7 @@ "document_name": "verification_method_test", "originator": "", "type": "requirement", - "text": "Dim file should allow only verification_methods attribute, but when test_setups method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file", + "text": "Dim file should allow only verification_methods attribute, but when verification_methods method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file", "verification_criteria": "", "feature": "", "change_request": "", diff --git a/dim/spec/test_input/verification_methods/output/verification_methods/Requirements.rst b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.rst similarity index 91% rename from dim/spec/test_input/verification_methods/output/verification_methods/Requirements.rst rename to dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.rst index 5a91b1c..4744010 100644 --- a/dim/spec/test_input/verification_methods/output/verification_methods/Requirements.rst +++ b/dim/spec/test_input/reqs/vm/output/verification_methods/Requirements.rst @@ -19,7 +19,7 @@ :verification_methods: none :verification_criteria: - :raw-html:`Dim file should allow only verification_methods attribute, but when test_setups method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file` + :raw-html:`Dim file should allow only verification_methods attribute, but when verification_methods method is called on the requirement object it shall return the array that verification_methods attribute mentions in the Dim file` .. requirement:: ID_2 :category: unspecified diff --git a/dim/spec/test_input/reqs/ts/resolve_config.dim b/dim/spec/test_input/reqs/vm/resolve_config.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/resolve_config.dim rename to dim/spec/test_input/reqs/vm/resolve_config.dim diff --git a/dim/spec/test_input/reqs/ts/resolve_input.dim b/dim/spec/test_input/reqs/vm/resolve_input.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/resolve_input.dim rename to dim/spec/test_input/reqs/vm/resolve_input.dim diff --git a/dim/spec/test_input/reqs/ts/resolve_module.dim b/dim/spec/test_input/reqs/vm/resolve_module.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/resolve_module.dim rename to dim/spec/test_input/reqs/vm/resolve_module.dim diff --git a/dim/spec/test_input/reqs/ts/resolve_software.dim b/dim/spec/test_input/reqs/vm/resolve_software.dim similarity index 100% rename from dim/spec/test_input/reqs/ts/resolve_software.dim rename to dim/spec/test_input/reqs/vm/resolve_software.dim diff --git a/dim/spec/test_input/reqs/vm/unknown.dim b/dim/spec/test_input/reqs/vm/unknown.dim new file mode 100644 index 0000000..2a0a8c6 --- /dev/null +++ b/dim/spec/test_input/reqs/vm/unknown.dim @@ -0,0 +1,4 @@ +module: Name1 + +id_unknown: + verification_methods: unknown diff --git a/dim/spec/test_input/reqs/vm/valid.dim b/dim/spec/test_input/reqs/vm/valid.dim new file mode 100644 index 0000000..fa70dfb --- /dev/null +++ b/dim/spec/test_input/reqs/vm/valid.dim @@ -0,0 +1,7 @@ +module: Name1 + +id_v1: + verification_methods: none + +id_v2: + verification_methods: off_target, on_target, manual diff --git a/dim/spec/test_input/resolved_function/modules/Module1.dim b/dim/spec/test_input/resolved_function/modules/Module1.dim index 31e96a1..112bc1c 100644 --- a/dim/spec/test_input/resolved_function/modules/Module1.dim +++ b/dim/spec/test_input/resolved_function/modules/Module1.dim @@ -6,7 +6,7 @@ RESOLVE_001: RESOLVE_002: text: Test req - test_setups: on_target, manual + verification_methods: on_target, manual RESOLVE_003: text: Test req diff --git a/dim/spec/test_input/verification_methods/all_none.dim b/dim/spec/test_input/verification_methods/all_none.dim deleted file mode 100644 index b1dfc12..0000000 --- a/dim/spec/test_input/verification_methods/all_none.dim +++ /dev/null @@ -1,5 +0,0 @@ -module: test_verification_methods - -ID_1: - test_setups: none - verification_methods: none, none diff --git a/dim/spec/test_input/verification_methods/all_none.dim.expected b/dim/spec/test_input/verification_methods/all_none.dim.expected deleted file mode 100644 index 7414740..0000000 --- a/dim/spec/test_input/verification_methods/all_none.dim.expected +++ /dev/null @@ -1,4 +0,0 @@ -document: test_verification_methods - -ID_1: - verification_methods: none diff --git a/dim/spec/test_input/verification_methods/none_test_setups.dim b/dim/spec/test_input/verification_methods/none_test_setups.dim deleted file mode 100644 index 0ea1d11..0000000 --- a/dim/spec/test_input/verification_methods/none_test_setups.dim +++ /dev/null @@ -1,5 +0,0 @@ -module: test_verification_methods - -ID_1: - verification_methods: off_target - test_setups: none diff --git a/dim/spec/test_input/verification_methods/none_verification_methods.dim b/dim/spec/test_input/verification_methods/none_verification_methods.dim deleted file mode 100644 index c850881..0000000 --- a/dim/spec/test_input/verification_methods/none_verification_methods.dim +++ /dev/null @@ -1,6 +0,0 @@ -module: test_verification_methods - -ID_1: - verification_methods: none - test_setups: off_target - diff --git a/dim/spec/test_input/verification_methods/single_none.dim b/dim/spec/test_input/verification_methods/single_none.dim deleted file mode 100644 index ceae170..0000000 --- a/dim/spec/test_input/verification_methods/single_none.dim +++ /dev/null @@ -1,7 +0,0 @@ -module: test_verification_methods - -ID_1: - test_setups: none - -ID_2: - verification_methods: none diff --git a/dim/spec/test_input/verification_methods/single_none.dim.expected b/dim/spec/test_input/verification_methods/single_none.dim.expected deleted file mode 100644 index 647dfa9..0000000 --- a/dim/spec/test_input/verification_methods/single_none.dim.expected +++ /dev/null @@ -1,7 +0,0 @@ -document: test_verification_methods - -ID_1: - verification_methods: none - -ID_2: - verification_methods: none diff --git a/dim/spec/test_input/verification_methods/verification_methods.dim b/dim/spec/test_input/verification_methods/verification_methods.dim deleted file mode 100644 index 8eb9af2..0000000 --- a/dim/spec/test_input/verification_methods/verification_methods.dim +++ /dev/null @@ -1,21 +0,0 @@ -module: verification_method_test - -ID_1: - text: > - Dim file should allow only verification_methods attribute, - but when test_setups method is called on the requirement object - it shall return the array that verification_methods attribute - mentions in the Dim file - -ID_2: - verification_methods: off_target, on_target - -ID_3: - verification_methods: off_target,off_target - -ID_4: - verification_methods: | - off_target,on_target,off_target,on_target - -ID_5: - test_setups: off_target, on_target, manual diff --git a/dim/spec/test_input/verification_methods/verification_methods.dim.expected b/dim/spec/test_input/verification_methods/verification_methods.dim.expected deleted file mode 100644 index ce8ab01..0000000 --- a/dim/spec/test_input/verification_methods/verification_methods.dim.expected +++ /dev/null @@ -1,18 +0,0 @@ -document: verification_method_test - -ID_1: - text: Dim file should allow only verification_methods attribute, but when test_setups method is - called on the requirement object it shall return the array that verification_methods - attribute mentions in the Dim file - -ID_2: - verification_methods: off_target, on_target - -ID_3: - verification_methods: off_target - -ID_4: - verification_methods: off_target, on_target - -ID_5: - verification_methods: off_target, on_target, manual diff --git a/dim/spec/test_input/with_custom_attributes/output/csv/Requirements.csv b/dim/spec/test_input/with_custom_attributes/output/csv/Requirements.csv index 8acd7a8..badad9f 100644 --- a/dim/spec/test_input/with_custom_attributes/output/csv/Requirements.csv +++ b/dim/spec/test_input/with_custom_attributes/output/csv/Requirements.csv @@ -1,5 +1,5 @@ Sep=, -id,module_name,originator,type,text,verification_criteria,feature,change_request,tags,asil,cal,developer,tester,test_setups,status,review_status,comment,miscellaneous,sources,refs,cluster,necessary +id,module_name,originator,type,text,verification_criteria,feature,change_request,tags,asil,cal,developer,tester,verification_methods,status,review_status,comment,miscellaneous,sources,refs,cluster,necessary "test_id_1","test_module","CompanyName","requirement","First Test Requirement","","","","","not_set","not_set","CompanyName","CompanyName","off_target","invalid","accepted","","","","","1.6.5" "test_id_2","test_module","CompanyName","requirement","Second Test Requirement","","","","covered","not_set","not_set","CompanyName","CompanyName","off_target","draft","accepted","","","","","","" "test_id_3","test_module","CompanyName","requirement","Third Test Requirement","","","","","not_set","not_set","CompanyName","CompanyName","off_target","draft","unclear","","","","","","" diff --git a/dim/spec/test_input/with_custom_attributes/output/rst/Requirements.rst b/dim/spec/test_input/with_custom_attributes/output/rst/Requirements.rst index 1ca5f17..dfdca5e 100644 --- a/dim/spec/test_input/with_custom_attributes/output/rst/Requirements.rst +++ b/dim/spec/test_input/with_custom_attributes/output/rst/Requirements.rst @@ -11,7 +11,7 @@ :necessary: false :developer: CompanyName :tester: CompanyName - :test_setups: off_target + :verification_methods: off_target :raw-html:`First Test Requirement` @@ -24,7 +24,7 @@ :tags: covered :developer: CompanyName :tester: CompanyName - :test_setups: off_target + :verification_methods: off_target :raw-html:`Second Test Requirement` @@ -36,6 +36,6 @@ :cal: not_set :developer: CompanyName :tester: CompanyName - :test_setups: off_target + :verification_methods: off_target :raw-html:`Third Test Requirement`