Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programming exercises: Add visualization of test case errors #9213

Merged

Conversation

az108
Copy link
Contributor

@az108 az108 commented Aug 13, 2024

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Instructors should have clear insights into why specific tests are failing. Such insights facilitate a
deeper understanding of both internal errors and student mistakes, empowering instructors to rectify errors in exercises.
Having a deeper understanding of such errors leads to high-quality feedback, enabling students to identify faulty portions
of their code and understand why certain parts do not work as expected. As a result, a smoother and more intuitive workflow, enhancing the learning experience for both instructors and students. Creating an easy-to-access visualization of common mistakes made by students, organized by occurrence, helps instructors identify misunderstandings and refine their teaching methods.

Description

Created an easy-to-access visualization of common mistakes made by students, organized by occurrence. This helps instructors identify low quality feedback on testcases. Being able to filter or sort these table entries will be covered in follow up PRs. I introduce a TestcaseAnalysisComponent for analyzing test case feedback, providing detailed insights into programming tasks. This provides a structured layout for displaying test case occurrences and feedback with a new section for error analysis and for improving clarity of error feedback. Currently one can see the occurence and the feedback details. The columns have following information right now: Occurence, Error Message, related task, related testcase and a Error Category which will be another feature (will be introduced in follow up PRs)
This PR was tested on a Course with 1500 test students and no performance issues were found.
image

Before:
image

After:
image

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Programming Exercise
  1. Log in to Artemis
  2. Create a Programming Exercise
  3. Solve the Programming Exercise as Students, ideally with different kinds of Progress
  4. Navigate as Instructor to the Grading of an Exercise
  5. Navigate to the new section Test Analysis
  6. Verify that the data in the table is displayed correctly.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (expect)
feedback-analysis.component.ts 100%
feedback-analysis.service.ts 100%

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced methods for retrieving aggregated feedback and counting distinct results for programming exercises.
    • Added a new API endpoint for fetching all feedback details related to specific exercises.
    • Implemented a Feedback Analysis Component for enhanced analysis of feedback in programming exercises.
    • Added a dedicated "Feedback Analysis" tab in the grading interface for better management of feedback.
  • User Interface Enhancements

    • Improved layout for displaying detailed feedback related to programming exercises.
    • Streamlined navigation and context-specific display for grading actions based on selected tabs.
  • Internationalization

    • Enhanced user feedback structure with new localized strings for feedback analysis in both German and English.
  • Tests

    • Expanded integration tests to cover new feedback retrieval functionalities.
    • Introduced unit tests for the Feedback Analysis Component and Service.

@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) labels Aug 13, 2024
@az108 az108 changed the title Programming ExercisesTemplate for Visualization of Test Case Errors Programming Exercises: Template for Visualization of Test Case Errors Aug 13, 2024
@az108 az108 changed the title Programming Exercises: Template for Visualization of Test Case Errors Programming Exercises: Add Visualization of Test Case Errors in a Table Aug 15, 2024
@az108 az108 marked this pull request as ready for review August 15, 2024 14:44
@az108 az108 requested a review from a team as a code owner August 15, 2024 14:44
Copy link

coderabbitai bot commented Aug 15, 2024

Walkthrough

The updates introduce a "Feedback Analysis" feature within the grading interface, enhancing the retrieval and analysis of detailed feedback on programming exercises. This implementation includes new methods, API endpoints, and data transfer objects to facilitate the management and presentation of feedback data, along with improvements to the user interface for better navigation.

Changes

Files Change Summary
.../feedback-analysis/feedback-analysis.component.html Introduced UI for analyzing feedback on programming exercises.
.../feedback-analysis/feedback-analysis.component.ts Implemented logic for loading and processing feedback details based on exercise ID.
.../feedback-analysis/feedback-analysis.service.ts Created service for managing feedback analysis operations.
.../web/rest/ResultResource.java Added new endpoint for retrieving feedback details associated with specific exercises.
.../web/rest/dto/feedback/FeedbackDetailDTO.java Introduced FeedbackDetailDTO for encapsulating feedback-related information.
.../repository/StudentParticipationRepository.java Added methods for retrieving aggregated feedback and counting distinct results by exercise ID.
.../assessment/ResultService.java Added method for processing and aggregating feedback data.
.../i18n/de/programmingExercise.json Enhanced internationalization entries for "Feedback Analysis" terminology.
.../i18n/en/programmingExercise.json Added new section for "feedbackAnalysis" to improve user feedback localization.
.../feedback-analysis/feedback-analysis.component.spec.ts Created unit tests for the FeedbackAnalysisComponent to validate its functionality.
.../feedback-analysis/feedback-analysis.service.spec.ts Added unit tests for the FeedbackAnalysisService to ensure proper functionality and error handling.
.../assessment/ResultServiceIntegrationTest.java Enhanced integration tests for the ResultService, focusing on feedback retrieval.
.../programming-exercise-configure-grading.component.html Added "Feedback Analysis" tab for improved user navigation.
.../programming-exercise-configure-grading.component.ts Updated GradingTab type to include 'feedback-analysis'.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GradingComponent as Grading Component
    participant FeedbackAnalysis as Feedback Analysis Component
    participant FeedbackAnalysisService
    participant ResultService

    User->>GradingComponent: Select "Feedback Analysis" tab
    GradingComponent->>FeedbackAnalysis: Load feedback details
    FeedbackAnalysis->>FeedbackAnalysisService: Fetch feedback details for exercise
    FeedbackAnalysisService-->>FeedbackAnalysis: Return feedback details
    FeedbackAnalysis->>ResultService: Load additional result details
    ResultService-->>FeedbackAnalysis: Return result details
    FeedbackAnalysis->>User: Display feedback analysis results
Loading

Possibly related issues

Tip

We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.


Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between d2970f6 and d461a88.

Files selected for processing (1)
  • src/main/webapp/app/exercises/programming/manage/grading/programming-exercise-configure-grading.component.ts (2 hunks)
Additional context used
Path-based instructions (1)
src/main/webapp/app/exercises/programming/manage/grading/programming-exercise-configure-grading.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

Additional comments not posted (1)
src/main/webapp/app/exercises/programming/manage/grading/programming-exercise-configure-grading.component.ts (1)

59-59: Approve addition of 'feedback-analysis' to GradingTab type.

The change looks good and expands the available grading tabs.

Please ensure that:

  • The new 'feedback-analysis' tab is properly integrated into the component's navigation logic and UI.
  • Any component initialization logic and tests that handle tab selection are updated to incorporate 'feedback-analysis'.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 15, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 28, 2024
pzdr7
pzdr7 previously approved these changes Aug 28, 2024
Copy link
Contributor

@dfuchss dfuchss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens with test results that are very long? Our tests typically contain a lot of output.

@az108
Copy link
Contributor Author

az108 commented Aug 28, 2024

What happens with test results that are very long? Our tests typically contain a lot of output.

The output in the table will be limited in the follow up PRs and a detail button will be added, allowing one to see the whole Feedback message.

@dfuchss
Copy link
Contributor

dfuchss commented Aug 28, 2024

What happens on different output for the same test? Are the different outputs in different lines?

@az108
Copy link
Contributor Author

az108 commented Aug 28, 2024

What happens on different output for the same test? Are the different outputs in different lines?

Yes, different outputs are seperate table rows with the corresponding testcase listed in that column

Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One (optional) translations comment

src/main/webapp/i18n/de/programmingExercise.json Outdated Show resolved Hide resolved
@az108 az108 dismissed stale reviews from pzdr7 and coderabbitai[bot] via d2970f6 August 29, 2024 07:31
Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link
Contributor

@pzdr7 pzdr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapprove

Copy link
Contributor

@raffifasaro raffifasaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapprove

Copy link
Contributor

@sarpsahinalp sarpsahinalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

@krusche krusche modified the milestones: 7.5.1, 7.5.2 Sep 2, 2024
Copy link
Contributor

@MarkusPaulsen MarkusPaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine + Tested locally on Aniruddh's machine with 1014 Students with 2 submissions each

@MarkusPaulsen MarkusPaulsen added the maintainer-approved The feature maintainer has approved the PR label Sep 3, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

@krusche krusche merged commit fa2e539 into develop Sep 7, 2024
36 of 49 checks passed
@krusche krusche deleted the feature/programming-exercises/add-advanced-errorfiltering-page branch September 7, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) feature maintainer-approved The feature maintainer has approved the PR ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.