Thursday 11 October 2012

O2 Script - Create TM Library from CheckMarx CWE data

Bellow is a pretty cool O2 script that created an TeamMentor Library from the raw Xml files I extracted from the CheckMarx database:

This is what the created Library looks like:



We can link directly to an article using the CWE ID (in the case below 170) and we can edit it too.



Since these were direct imports from the Html used by CheckMarx, the CSS style is a bit off when the article is shown in TeamMentor's article CSS (see above).

Interestingly, the CheckMarx CWE database included a special ID which contained a CSS style (you will see how that was handled in the O2 Script below), so by putting that CSS content into an TM article called main.css, we can re-use the CSS reference (to that file) in some CWE articles.

Here is what the same article shown above looks like with the main.css applied:


Still a couple CSS tweaks needed but much better :)

Here is the code that created the Library: