Prompt Title: DOORS Baseline Comparison.

Created 1 year ago
Votes 0
Views 353 times
0
Human: how can I do a diff between 2 baselines in DOORS
ChatGPT:

IBM Rational DOORS (Dynamic Object-Oriented Requirements System) is a requirements management tool used to capture, trace, analyze, and manage project requirements. DOORS does not have a built-in diff functionality to directly compare two different baselines, but you can achieve this by following the steps below:

  1. Export the baselines to Microsoft Word or Excel: First, you need to export the data from the two baselines you want to compare into an external file format, such as Microsoft Word or Excel.

a. In DOORS, open the module containing the baselines. b. Click on "File" > "Export" > "Microsoft Word" or "Microsoft Excel" depending on your preference. c. In the export window, select the baseline you want to export. d. Choose the export options that suit your needs, and click "Export." e. Save the exported file. f. Repeat steps b-e for the second baseline.

  1. Use Microsoft Word or Excel to compare the exported files: After exporting the baselines, you can use Microsoft Word or Excel to compare the differences between them.

a. For Microsoft Word: i. Open Microsoft Word. ii. Click on "Review" > "Compare" > "Compare." iii. In the "Original document" field, browse and select the first exported baseline. iv. In the "Revised document" field, browse and select the second exported baseline. v. Click "OK" to start the comparison. Word will create a new document highlighting the differences between the two baselines.

b. For Microsoft Excel: i. Open Microsoft Excel. ii. Open the first exported baseline file. iii. Open the second exported baseline file. iv. Use Excel formulas such as IF, ISERROR, and MATCH to compare cells from both files, or use a third-party add-in or VBA script for more advanced comparison.

  1. Analyze the differences: Review the comparison document created by Word or Excel to understand the differences between the two baselines. You may want to create a report documenting these differences or use them to update the DOORS module as needed.

Remember that comparing baselines in this manner may not capture all the intricate details and attributes of the DOORS objects. Nonetheless, this approach provides a practical way to identify differences between two baselines in DOORS.

Human: can you generate a python script that compares 2 xls exports from DOORS baselines?
ChatGPT:

Sure, here's a simple Python script that uses the pandas library to compare two Excel files (XLS or XLSX) exported from DOORS baselines. This script will generate a new Excel file highlighting the differences between the two baselines.

First, ensure that you have pandas and openpyxl installed. You can install them via pip:

bash
pip install pandas openpyxl

Here's the Python script:

python
import pandas as pd def compare_doors_baselines(file1, file2, output_file): df1 = pd.read_excel(file1) df2 = pd.read_excel(file2) if df1.shape != df2.shape: print("Warning: The two Excel files have different shapes.") diff = (df1 != df2) & ~(df1.isna() & df2.isna()) df_diff = df1.copy() for row in range(df_diff.shape[0]): for col in range(df_diff.shape[1]): if diff.iloc[row, col]: cell1 = df1.iloc[row, col] cell2 = df2.iloc[row, col] df_diff.iloc[row, col] = f"{cell1} -> {cell2}" else: df_diff.iloc[row, col] = "" df_diff.to_excel(output_file, index=False, engine='openpyxl') print(f"Differences saved to {output_file}") if __name__ == "__main__": baseline1 = "baseline1.xlsx" baseline2 = "baseline2.xlsx" output = "differences.xlsx" compare_doors_baselines(baseline1, baseline2, output)

Replace the baseline1, baseline2, and output variables with the appropriate filenames for your exported DOORS baselines and the desired output file.

This script assumes that both exported Excel files have the same structure, with objects in the same order. If the order of objects or structure is different, the comparison might not be accurate. You may need to adjust the script or preprocess the Excel files to ensure accurate comparison.

avatar
Andi Zehan
Shared 1 prompt
Created 1 year ago

Leave a Comment