Proposal for JSON Based Demo Results #3261
bernhste
started this conversation in
MASWE & MASTG v2 Beta Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all
I'm the developer of the MAS Reference App (https://github.com/Redguard/mas-reference-app) and I would like to contribute the demos to MAS. My idea is to use a script which extracts the MAS Reference App demos which can be used as MAS Demos. Then, I would be able to one by one create merge requests which then could be integrated into MASTG.
So I took a look at the MAS Test Apps and I would like to discuss a change:
Right now, the Demos return a simple String. According to the Documentation (https://docs.google.com/document/d/1EMsVdfrDBAu0gmjWAUEs60q-fWaOmDB5oecY9d9pOlg/edit?tab=t.0#heading=h.y7p2nsbtajht) there are FAIL and PASS states.
My proposal is to use a JSON array for the demo results. An example:
I forked https://github.com/cpholguera/MASTestApp-Android to implement a small PoC. For the result I created a class
DemoResults
which takes care of the results.So when you write a new demo, you would implement the demo in the following way
The test app could then use it to show the results accordingly:
In my option, this would have the following benefits:
DemoResult
class to log the different results in one place and make it easier to automatially assess the results of the different demos during runtime.The PoC is compatible to the existing demos, meaning, it does not break if
mastgTest()
does not return a JSON string.To illustrate the new demo result, I used MASTG-DEMO-0007 and migrated it to the new MAS Test App:
Current Code:
Current output:
Proposed code:
Proposed output:

And finally, we have a log entry per test which could be used to automatically assess the result:
Please let me know if this is something which works for you in general. If so, I'm happy to provide the merge requests for Android and iOS.
Beta Was this translation helpful? Give feedback.
All reactions