Skip to content

Commit

Permalink
Merge pull request #293 from test-fullautomation/namsonx/task/stabi_b…
Browse files Browse the repository at this point in the history
…ranch

Namsonx/task/stabi branch
  • Loading branch information
test-fullautomation authored Aug 27, 2024
2 parents 3785ca1 + 1fb73e0 commit c5f7b72
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 31 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,47 @@
"
]
,
"0.12.0.;0.13.0." : [
"0.12.1.;0.13.0." : [
"
* Improved error messages in case of issues while loading the test configuration.

* Updated JSON schema validation.

* Resolved redundant code.

* Modified the naming convention check behavior in TestsuitesManagement to align with Robot Framework core standards.
* Modified the naming convention check to be aligned with Robot Framework core standards.

* Updated the three dots feature:
* Extended import of variant configuration files

After imported TestsuitesManagement library ``Library RobotFramework_TestsuitesManagement WITH NAME testsuites``,
a configuration file could be loaded by ``Suite Setup testsuites.testsuite_setup .../config/variants_config.jsonp``. Beside
absolute path and relative path, ``.../`` will help to navigate to ``/config/ directory in a test project.
After the **RobotFramework_TestsuitesManagement** library is imported

| ``Library RobotFramework_TestsuitesManagement WITH NAME testsuites``

a variant configuration file is usually loaded in a way like this:

| ``Suite Setup testsuites.testsuite_setup ./config/variants_config.jsonp``

With the *three-dots* syntax extension for relative paths, the positional dependency between the file containing the suite setup and the file with the variant configuration, is made dynamic.

| ``Suite Setup testsuites.testsuite_setup .../config/variants_config.jsonp``

The Robot Framework now also recursively considers parent directories while searching for variant configuration files starting with the actual relative path.

**Important**: This feature previously was located **inside** the variant configuration files, e.g.:

| ``\"default\": \u007b``
| `` \"name\": \"testconfig.json\",``
| `` \"path\": \".../\"``
| ``\u007d``

**This is not supported any more!** Only relative paths to the actual directory (``\"path\": \"./\"``) and to the parent directory (``\"path\": \"../\"``) are possible.

**Why this change?**

**Reason 1**: It would be confusing to have the *three-dots* syntax available at two different positions in parallel in the code.

**Reason 2**: It is possible now to move the folder containing the variant configuration files and the parameter configuration files up and down in the hierarchy of directories in the file sytem
**without the need to adapt any import path afterwards**!
"
]
}
Expand Down
52 changes: 27 additions & 25 deletions packagedoc/additional_docs/Description.tex
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ \section{Content of configuration files}
{
"default": {
"name": "robot_execution_config.jsonp",
"path": ".../config/"
"path": "./config/"
},
"variant_1": {
"name": "robot_config_variant_1.jsonp",
"path": ".../config/"
"path": "./config/"
},
"variant_2": {
"name": "robot_config_variant_2.jsonp",
"path": ".../config/"
"path": "./config/"
},
"variant_3": {
"name": "robot_config_variant_3.jsonp",
"path": ".../config/"
"path": "./config/"
}
}
\end{pythoncode}
Expand All @@ -114,26 +114,7 @@ \section{Content of configuration files}
\pcode{variant_1}, \pcode{variant_2} and \pcode{variant_3}. Additionally a variant named \pcode{default} is defined.
This default configuration becomes active in case of no certain variant name is provided when the test suite is being executed.

Another aspect is important: the \textbf{three dots}.
The path to the \plog{robot_config*.jsonp} files depends on the test file location. A
different number of \plog{../} is required dependent on the directory depth of the test
case location.

Therefore we use here three dots to tell the \pkg\ to search from the test
file location up till the \plog{robot_config*.jsonp} files are found:

\begin{pythonlog}
./config/robot_config.jsonp
../config/robot_config.jsonp
../../config/robot_config.jsonp
../../../config/robot_config.jsonp
\end{pythonlog}

and so on.

Hint: The paths to the \plog{robot_config*.jsonp} files are relative to the position of the test suite - \textbf{and not relative to the position of the
mapping file in which they are defined!} You are free to move your test suites one or more level up or down in the file system, but using the
three dots notation enables you to let the position of the \plog{config} folder unchanged.
The paths to the \plog{robot_config*.jsonp} files could be absolute paths or relative to the position of the mapping file.

It is of course still possible to use the standard notation for relative paths:

Expand Down Expand Up @@ -340,9 +321,30 @@ \section{Activation of "Test Suites Management"}
In case you want to realize a variant handling you have to provide the path and the name of a variants configuration file to the \rcode{testsuite_setup}:
\begin{robotcode}
Suite Setup tm.testsuite_setup ./config/exercise_variants.jsonp
Suite Setup tm.testsuite_setup .../config/exercise_variants.jsonp
\end{robotcode}
The path to the variants configuration file can be absolute path or relative to the position of the robot file.
Another aspect is important: the \textbf{three dots}.
The path to the \plog{/config/exercise_variants.jsonp} file depends on the robot file location. A
different number of \plog{../} is required dependent on the directory depth of the robot file location.
Therefore we use here three dots to tell the \pkg\ to search from the robot
file location up till the \plog{/config/exercise_variants.jsonp} file is found:
\begin{pythonlog}
./config/exercise_variants.jsonp
../config/exercise_variants.jsonp
../../config/exercise_variants.jsonp
../../../config/exercise_variants.jsonp
\end{pythonlog}
and so on.
Hint: You are free to move your test suites one or more level up or down in the file system, but using the
three dots notation enables you to let the position of the \plog{config} folder unchanged.
To ease the analysis of a test execution, the log file contains informations about the selected level and the path and the name of the used
configuration file, for example:
Expand Down

0 comments on commit c5f7b72

Please sign in to comment.