Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Traceability Matrix Tables #90

Merged
merged 21 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3ae4b00
Store learning objectives in data structures
Witiko Aug 2, 2024
cf7f850
Add markup for Business Outcomes to example document
Witiko Aug 11, 2024
bb24022
Collect and store Business Outcomes in data structures
Witiko Aug 11, 2024
45471f9
Merge branch 'main' into feat/traceability-matrix-table
Witiko Aug 11, 2024
ec4572c
Add `BO` prefix to Business Outcomes
Witiko Aug 12, 2024
727ed35
Remove section "Learning objectives", meant just for debugging
Witiko Aug 12, 2024
ba30d4a
Translate headers "Code" and "Name" for Business Outcomes
Witiko Aug 12, 2024
e6e5e43
Add `example-document/traceability-matrix.yml`
Witiko Aug 12, 2024
8bbd1fb
Fix style issue
Witiko Aug 12, 2024
8b6e4ec
Add argument `--preview-continuous` to command `compile-tex-to-pdf`
Witiko Aug 12, 2024
54c61f7
Merge remote-tracking branch 'origin/main' into feat/traceability-mat…
Witiko Aug 12, 2024
df237cf
Add snippet `traceability-matrix` to process `traceability-matrix.yml`
Witiko Aug 12, 2024
d6c984a
Support partial recompilation with the `compile-tex-to-pdf` command
Witiko Aug 13, 2024
6721b0a
Update snippet `istqb/common/traceability-matrix` to typeset an appendix
Witiko Aug 13, 2024
763e978
Remove tabs from the source code
Witiko Aug 13, 2024
e92b119
Demonstrate snippet `traceability-matrix` on example document
Witiko Aug 13, 2024
0e4e315
Support multipage output for the traceability matrix
Witiko Aug 20, 2024
c2ed15e
Update snippet `traceability-matrix`, so it typesets full trace. matrix
Witiko Aug 21, 2024
8d68e9e
Document traceability matrices
Witiko Aug 21, 2024
1875e2f
Merge remote-tracking branch 'origin/main' into feat/traceability-mat…
Witiko Aug 21, 2024
89ddadb
Document traceability matrices
Witiko Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions example-document.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,53 @@
% Index
\printindex

% Learning objectives
Witiko marked this conversation as resolved.
Show resolved Hide resolved
\istqbsection{Learning objectives}
\ExplSyntaxOn
\begin{itemize}
\seq_map_inline:Nn
\g_istqb_learning_objective_chapter_numbers_seq
{
\item Chapter~#1:~{}
\prop_item:Nn
\g_istqb_learning_objective_chapter_names_prop
{ #1 }
\begin{itemize}
\prop_get:NnN
\g_istqb_learning_objective_subchapter_numbers_prop
{ #1 }
\l_tmpa_clist
\clist_map_inline:Nn
\l_tmpa_clist
{
\item Subchapter~#1.##1:~{}
\prop_item:Nn
\g_istqb_learning_objective_subchapter_names_prop
{ #1.##1 }
\begin{itemize}
\prop_get:NnN
\g_istqb_learning_objective_numbers_prop
{ #1.##1 }
\l_tmpb_clist
\clist_map_inline:Nn
\l_tmpb_clist
{
\item Learning~objective~#1.##1.####1:~{}
\prop_item:Nn
\g_istqb_learning_objective_names_prop
{ #1.##1.####1 }
\begin{itemize}
\item K-Level:~{}
\prop_item:Nn
\g_istqb_learning_objective_k_levels_prop
{ #1.##1.####1 }
\end{itemize}
}
\end{itemize}
}
\end{itemize}
}
\end{itemize}
\ExplSyntaxOff

\end{document}
38 changes: 36 additions & 2 deletions example-document/02-markdown-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,43 @@ provided-by:
- Hungarian Testing Board
```

## Learning objectives and keywords
## Business outcomes {.business-outcomes}

You can write keywords and learning objectives as follows:
You can write business outcomes at the beginning of Chapter 0 as follows:

``` md
## Business outcomes {.business-outcomes}

1. Support and perform appropriate testing based on the software development lifecycle
followed
2. Apply the principles of risk-based testing
3. Select and apply appropriate test techniques to support the achievement of test
objectives
4. Provide documentation with appropriate levels of detail and quality
5. Determine the appropriate types of functional testing to be performed
6. Contribute to non-functional testing
7. Contribute to defect prevention
8. Improve the efficiency of the test process with the use of tools
9. Specify the requirements for test environments and test data
```

This will produce the following output:

1. Support and perform appropriate testing based on the software development lifecycle
followed
2. Apply the principles of risk-based testing
3. Select and apply appropriate test techniques to support the achievement of test
objectives
4. Provide documentation with appropriate levels of detail and quality
5. Determine the appropriate types of functional testing to be performed
6. Contribute to non-functional testing
7. Contribute to defect prevention
8. Improve the efficiency of the test process with the use of tools
9. Specify the requirements for test environments and test data

## Keywords and learning objectives

You can write keywords and learning objectives at beginnings of chapters as follows:

``` md
#### Keywords
Expand Down
107 changes: 96 additions & 11 deletions template/istqb.cls
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,16 @@
\titlespacing\subsection{0pt}{*5.5}{*0.8}
\titlespacing\subsubsection{0pt}{*3.25}{*1}
%%% Document commands
\newcommand\istqbsection[1]{%
\istqbupdateheadinglevel{1}%
\section{#1}%
\ExplSyntaxOn
\tl_new:N \g_istqb_current_chapter_name_tl
\newcommand\istqbsection[1]{
\istqbupdateheadinglevel{1}
\section{#1}
\tl_gset:Nn
\g_istqb_current_chapter_name_tl
{ #1 }
}
\ExplSyntaxOff
\newcommand\istqbsubsection[1]{%
\istqbupdateheadinglevel{2}%
\subsection{#1}%
Expand Down Expand Up @@ -603,33 +609,112 @@
\RequirePackage{longtable}
\newcounter{istqbobjective}[section]
\newcounter{istqbsubobjective}[istqbobjective]
\newenvironment{istqbobjectives}{%
\def\istqbobjective##1{%
\stepcounter{istqbobjective}%
\ExplSyntaxOn
\seq_new:N \g_istqb_learning_objective_chapter_numbers_seq
\prop_new:N \g_istqb_learning_objective_chapter_names_prop
\prop_new:N \g_istqb_learning_objective_subchapter_numbers_prop
\seq_new:N \l_istqb_learning_objective_subchapter_numbers_seq
\prop_new:N \g_istqb_learning_objective_subchapter_names_prop
\newenvironment{istqbobjectives}{
\seq_gput_right:Nx
\g_istqb_learning_objective_chapter_numbers_seq
{ \thesection }
\prop_gput:NxV
\g_istqb_learning_objective_chapter_names_prop
{ \thesection }
\g_istqb_current_chapter_name_tl
\def\istqbobjective##1{
\stepcounter{istqbobjective}
\par\kern -0.03in
\paragraph{\thesection.\theistqbobjective\enspace##1}%
\paragraph{\thesection.\theistqbobjective\enspace##1}
\par\leavevmode
}%
}{%
\setcounter{istqbobjective}{0}%
\prop_gput:Nxn
\g_istqb_learning_objective_subchapter_names_prop
{ \thesection . \theistqbobjective }
{ ##1 }
\seq_put_right:Nx
\l_istqb_learning_objective_subchapter_numbers_seq
{ \theistqbobjective }
}
}{
\clist_set_from_seq:NN
\l_tmpa_clist
\l_istqb_learning_objective_subchapter_numbers_seq
\prop_gput:NxV
\g_istqb_learning_objective_subchapter_numbers_prop
{ \thesection }
\l_tmpa_clist
\setcounter{istqbobjective}{0}
\par\kern 0.12in
}
\ExplSyntaxOn
\cs_generate_variant:Nn
\prop_gput:Nnn
{ Nxn, NxV }
\tl_new:N \g_istqb_prefix_tl
\tl_gset:Nn \g_istqb_prefix_tl { ?? }
\prop_new:N \g_istqb_learning_objective_numbers_prop
\seq_new:N \g_istqb_learning_objective_numbers_seq
\prop_new:N \g_istqb_learning_objective_names_prop
\prop_new:N \g_istqb_learning_objective_k_levels_prop
\tl_new:N \l_istqb_current_learning_objective_text_tl
\regex_const:Nn \c_istqb_learning_objective_regex { ^\((K[0-9])\)\ +(.+)$ }
\newenvironment{istqbsubobjectives}{
\seq_gclear:N
\g_istqb_learning_objective_numbers_seq
\def\istqbsubobjective##1{
\stepcounter{istqbsubobjective}
\g_istqb_prefix_tl-\thesection.\theistqbobjective.\theistqbsubobjective & ##1 \\[0.07in]
\tl_set:Nn
\l_istqb_current_learning_objective_text_tl
{ ##1 }
\regex_replace_once:NnNTF
\c_istqb_learning_objective_regex
{
\c{prop_gput:Nxn}
\c{g_istqb_learning_objective_k_levels_prop}
\cB\{ \c{thesection} . \c{theistqbobjective} . \c{theistqbsubobjective} \cE\}
\cB\{ \1 \cE\}
\c{prop_gput:Nxn}
\c{g_istqb_learning_objective_names_prop}
\cB\{ \c{thesection} . \c{theistqbobjective} . \c{theistqbsubobjective} \cE\}
\cB\{ \2 \cE\}
}
\l_istqb_current_learning_objective_text_tl
{
\tl_use:N
\l_istqb_current_learning_objective_text_tl
}
{
\msg_error:nnV
{ istqb }
{ malformed-learning-objective }
\l_istqb_current_learning_objective_text_tl
}
\seq_gput_right:Nx
\g_istqb_learning_objective_numbers_seq
{ \theistqbsubobjective }
}
\LTpre=0.08in
\LTpost=0.12in
\begin{longtable}{@{}p{1in}@{}p{\dimexpr(\linewidth - 1in)}@{}}
}{
\end{longtable}
\clist_set_from_seq:NN
\l_tmpa_clist
\g_istqb_learning_objective_numbers_seq
\prop_gput:NxV
\g_istqb_learning_objective_numbers_prop
{ \thesection . \theistqbobjective }
\l_tmpa_clist
\setcounter{istqbsubobjective}{0}
\par\kern -0.2in
}
\msg_new:nnn
{ istqb }
{ malformed-learning-objective }
{
Learning~objective~"#1"~is~not~in~the~expected~format~"(K?)~OBJECTIVE".
}
\ExplSyntaxOff

%% Appendices
Expand Down
63 changes: 63 additions & 0 deletions template/markdownthemeistqb_common.sty
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@

% Headings
\seq_new:N \l_istqb_header_identifiers_seq
\tl_new:N \l_istqb_business_outcomes_table_tl
\seq_new:N \g_istqb_business_outcomes_numbers_seq
\prop_new:N \g_istqb_business_outcomes_names_prop
\markdownSetup
{
headerAttributes,
Expand Down Expand Up @@ -602,6 +605,66 @@
\begin { istqb objectives }
}
},
attributeClassName += {
%% Business outcomes
\tl_if_eq:nnT
{ ##1 }
{ business-outcomes }
{
\group_begin:
\markdownSetup
{
rendererPrototypes = {
olBegin = {
\group_begin:
\tl_set:Nn
\l_istqb_business_outcomes_table_tl
{
\begin { istqbtable } { |l|X| }
Code & Name \\ \hline
}
\markdownSetup
{
rendererPrototypes = {
olItemWithNumber = {
\def\next################1\markdownRendererOlItemEnd
{
\seq_gput_right:Nn
\g_istqb_business_outcomes_numbers_seq
{ ########1 }
\prop_gput:Nnn
\g_istqb_business_outcomes_names_prop
{ ########1 }
{ ################1 }
\tl_put_right:Nn
\l_istqb_business_outcomes_table_tl
{
\g_istqb_prefix_tl - ########1 &
Witiko marked this conversation as resolved.
Show resolved Hide resolved
################1 \\ \hline
}
}
\next
},
olEnd = {
\tl_put_right:Nn
\l_istqb_business_outcomes_table_tl
{
\end { istqbtable }
}
\tl_use:N
\l_istqb_business_outcomes_table_tl
\group_end:
},
}
}
},
sectionEnd = {
\group_end:
},
}
}
}
},
attributeIdentifier = {
\group_begin:
\def\next####1{
Expand Down
Loading