Skip to content

Commit

Permalink
Merge pull request #36 from mPokornyETM/integrate-into-ctrl-TF
Browse files Browse the repository at this point in the history
Integrate quality gates into WinCC OA TestFramework
  • Loading branch information
dhoegerlETM authored May 5, 2023
2 parents ca5aac9 + 7360413 commit 4153006
Show file tree
Hide file tree
Showing 34 changed files with 148 additions and 557 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"enabled": true
},
{
"id": "PanelCheck.panel.extention",
"id": "PanelCheck.panel.extension",
"description":{
"de_AT.utf8":"Überprüft Dateien auf die angegebene Erweiterung",
"en_US.utf8":"Checks files for the specified extentions"
"en_US.utf8":"Checks files for the specified extensions"
},
"referenceValues": ["pnl", "xml"],
"scorePoints": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"enabled": true
},
{
"id": "PicturesFile.file.extention",
"id": "PicturesFile.file.extension",
"description":{
"de_AT.utf8":"Überprüft die Dateierweiterung des Bildes",
"en_US.utf8":"Checks the file extension of the picture"
Expand Down
2 changes: 1 addition & 1 deletion WinCCOA_QualityChecks/data/qualityGates/settings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

| Parameter | referenceValues |
|-----------|------------------------------------------------------------------------------------------|
| Function | Custom values used in the check (use depends on the check)<br>(e.g.: allowed extentions) |
| Function | Custom values used in the check (use depends on the check)<br>(e.g.: allowed extensions) |
| Datatypes | dyn_mixed |
| Example | ["pnl", "xml", ""] |
<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"enabled": true
},
{
"id": "ScriptFile.file.extention",
"id": "ScriptFile.file.extension",
"description":{
"de_AT.utf8":"Überprüft Dateien auf die angegebenen Erweiterungen",
"en_US.utf8":"Checks files for the specified extensions"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
details,WinCCOA internal files
assert.exist,File '$file.name' exist?
reason.exist,The file '$file.name' does not exist
assert.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt extention?
assert.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt extension?
reason.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
assert.isCheater,Is file overloaded
assert.isCheater,Check if file $location is overloaded.
reason.isCheater,It is not allowed to overwrite WinCCOA-license check files: $file.name
filesList,Files
assert.isOverloaded,Is file overloaded
assert.isOverloaded,Check if file $location is overloaded.
reason.isOverloaded,The file '$file.name' is overloaded from '$file.isOverloadedFrom'.
assert.isOverloadedAllowed,Is file overloaded
assert.isOverloadedAllowed,Check if file $location is overloaded (allowed overloads).
reason.isOverloadedAllowed,The file '$file.name' is overloaded from '$file.isOverloadedFrom'. -> It's allowed
4 changes: 2 additions & 2 deletions WinCCOA_QualityChecks/msg/de_AT.utf8/QgStaticCheck_Panels.cat
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ assert.panel.isCalculated,Is calculated
reason.panel.isCalculated,Sorry, the panel '($panel.name)' can't be calculated.
assert.panel.isExampleFile,Is example
reason.panel.isExampleFile,The panel '($panel.name)' is an example file. Examples are ignored.
assert.panel.extention,Extention
reason.panel.extention,The panel '$panel.name' has an invalid extention '$panel.extention'.
assert.panel.extension,Extension
reason.panel.extension,The panel '$panel.name' has an invalid extension '$panel.extension'.
assert.panel.isBackUp,Backup panel (.bak)
reason.panel.isBackUp,Sorry, the panel '($panel.name)' is a backup, can't be calculated.
assert.panel.isCrypted,Is encrypted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ filesList,Files
subDirsList,Sub directories
assert.file.size,Size
reason.file.size,The picture '$file.name' is too big ($file.size).
assert.file.extention,Extention
reason.file.extention,The picture '$file.name' has an invalid extention '$file.extention'.
assert.file.extension,Extension
reason.file.extension,The picture '$file.name' has an invalid extension '$file.extension'. Possible extensions: $allowedValues
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ assert.file.isCalculated,Is calculated
reason.file.isCalculated,Sorry, the script '($file.name)' can't be calculated.
assert.file.isExampleFile,Is an example file
reason.file.isExampleFile,The script '($file.name)' is an example file. Examples are ignored.
assert.file.extention,Extention
reason.file.extention,The script '$file.name' has an invalid extention '$file.extention'.
assert.file.extension,Extension
reason.file.extension,The script '$file.name' has an invalid extension '$file.extension'.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
details,WinCCOA internal files
assert.exist,File '$file.name' exist?
reason.exist,The file '$file.name' does not exist
assert.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt extention?
assert.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt extension?
reason.WinCCOALicenseCtrlExtExist,Contains WinCCOALicenseCtrlExt.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
assert.isCheater,Is file overloaded
assert.isCheater,Check if file $location is overloaded.
reason.isCheater,It is not allowed to overwrite WinCCOA-license check files: $file.name
filesList,Files
assert.isOverloaded,Is file overloaded
assert.isOverloaded,Check if file $location is overloaded.
reason.isOverloaded,The file '$file.name' is overloaded from '$file.isOverloadedFrom'.
assert.isOverloadedAllowed,Is file overloaded
assert.isOverloadedAllowed,Check if file $location is overloaded (allowed overloads).
reason.isOverloadedAllowed,The file '$file.name' is overloaded from '$file.isOverloadedFrom'. -> It's allowed
4 changes: 2 additions & 2 deletions WinCCOA_QualityChecks/msg/en_US.utf8/QgStaticCheck_Panels.cat
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ assert.panel.isCalculated,Is calculated
reason.panel.isCalculated,Sorry, the panel '($panel.name)' can't be calculated.
assert.panel.isExampleFile,Is example
reason.panel.isExampleFile,The panel '($panel.name)' is an example file. Examples are ignored.
assert.panel.extention,Extention
reason.panel.extention,The panel '$panel.name' has an invalid extention '$panel.extention'.
assert.panel.extension,Extension
reason.panel.extension,The panel '$panel.name' has an invalid extension '$panel.extension'.
assert.panel.isBackUp,Backup panel (.bak)
reason.panel.isBackUp,Sorry, the panel '($panel.name)' is a backup, can't be calculated.
assert.panel.isCrypted,Is encrypted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ filesList,Files
subDirsList,Sub directories
assert.file.size,Size
reason.file.size,The picture '$file.name' is too big ($file.size).
assert.file.extention,Extention
reason.file.extention,The picture '$file.name' has an invalid extention '$file.extention'.
assert.file.extension,Extension
reason.file.extension,The picture '$file.name' has an invalid extension '$file.extension'. Possible extensions: $allowedValues
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ assert.file.isCalculated,Is calculated
reason.file.isCalculated,Sorry, the script '($file.name)' can't be calculated.
assert.file.isExampleFile,Is an example file
reason.file.isExampleFile,The script '($file.name)' is an example file. Examples are ignored.
assert.file.extention,Extention
reason.file.extention,The script '$file.name' has an invalid extention '$file.extention'.
assert.file.extension,Extension
reason.file.extension,The script '$file.name' has an invalid extension '$file.extension'.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#uses "classes/QualityGates/QgCtrlppCheck/QgCtrlppCheck"

void main()
void main(string path = PROJ_PATH)
{
exit(start_QgCtrlppCheck());
exit(start_QgCtrlppCheck(path));
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class QgStaticPanelCheck : QgBase
//--------------------------------------------------------------------------------
//@public members
//--------------------------------------------------------------------------------
public string checkedPath = PROJ_PATH;

//------------------------------------------------------------------------------
/** @brief Function setups panels tests.
Expand All @@ -36,8 +37,9 @@ class QgStaticPanelCheck : QgBase
{
if ( QgBase::setUp() )
return -1;

_panels.setDir(PROJ_PATH + PANELS_REL_PATH);

throwError(makeError("", PRIO_INFO, ERR_CONTROL, 0, Qg::getId() + " will check " + this.checkedPath + PANELS_REL_PATH));
_panels.setDir(this.checkedPath + PANELS_REL_PATH);

if ( !_panels.exists() )
setMinValidScore("QgStaticCheck_Panels", "assert.missingPanels", "reason.missingPanels");
Expand Down Expand Up @@ -90,10 +92,11 @@ class QgStaticPanelCheck : QgBase
/**
@breif main rutine to start QualityGate QgStaticCheck-panels
*/
void main()
void main(string path = PROJ_PATH)
{
Qg::setId("QgStaticCheck_Panels");
QgStaticPanelCheck qg = QgStaticPanelCheck();
qg.checkedPath = path;
exit(qg.start());
}

Loading

0 comments on commit 4153006

Please sign in to comment.