Skip to content

Add support for text formatting of test case steps #1398

Description

@LexLuengas

Summary

Enhance create_test_case and update_test_case_steps in src/tools/test-plans.ts to support text formatting inside test steps content (action or expected result).

Today, both tools route step content through convertStepsToXml(), which escapes all markup via escapeXml(). As a result, formatting intended for Azure DevOps rich text fields (for example bold, italic, inline code, lists, links) is rendered as literal text instead of formatted content.

Tools

  • testplan_create_test_case
  • testplan_update_test_case_steps

Expected behavior

When formatted step content is passed to the tools, formatting should be preserved in Azure DevOps test steps rather than escaped into plain text.

Examples of formatting that should be supported/whitelisted:

  • Bold/italic emphasis
  • Inline code / code-like text
  • Basic lists and links

Current behavior

convertStepsToXml() always applies XML escaping to step and expected result text:

  • <b>Save</b> becomes &lt;b&gt;Save&lt;/b&gt;
  • Markdown markers like **bold** are also treated as literal text
  • Line breaks \n do render correctly.

So, regardless of the input format, the resulting test case step content is unformatted in Azure DevOps.

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions