Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
clean-test
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • clean-and-itasks
  • clean-test
  • Merge Requests
  • !9

Merged
Opened Aug 09, 2019 by Camil Staps@cstaps🚀Owner

Use source locations in JUnit export when available

  • Overview 6
  • Commits 2
  • Pipelines 4
  • Changes 5

I have been working on outputting test results in JUnit's XML format. This will allow us to upload test results as artifacts from GitLab CI, and the results can be displayed on merge requests (see https://docs.gitlab.com/ce/ci/junit_test_reports.html#how-it-works for details).

For this to work, the export should ideally also contain the module name of failing tests, so that the merge request UI can display this information. This collection of MRs adds support for location information (currently only module name) and adds this information to tests generated by test-properties.

  • clean-platform!264 (merged) is needed to add location support to the common interface for the test tools. I have added this as a new record, currently with only one field (loc_module), so that it can easily be extended in the future.
  • gast!27 (merged) is needed to keep track of the location in Gast. It is either retrieved from the binary (in the Testable instance for (a -> b), for example), or provided by the programmer with location_and_name.
  • clean-test-properties!1 (merged) is needed to use this location_and_name.
  • iTasks-SDK!299 (merged) updates for changes to Platform.

(CI on most of these fails because of dependencies between them.)

Our tests are currently still a bit ad hoc and this may seem unneeded, but hopefully in the future we will have more tests. Of course, these will not all be generated by test-properties (or even use Gast; e.g. iTasks-SDK#153). We will then have to think about ways to get location information in such other scenarios.

Here is what the UI looks like on a test project with a property named rem on a function some_sequence:

2019-08-09-203116_378x156

Clicking on the failed test reveals the module name main:

2019-08-10-000303_820x432

@baslijns @mlubbers @smichels what do you think?

Edited Aug 10, 2019 by Camil Staps
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: clean-and-itasks/clean-test!9
Source branch: testing-source-locations

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.