LaunchCodeEducation / LaunchCodeEducation/CSharp6-TechJobs-OO
C# assignment 2: False test failures on Windows Visual Studio 2022
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 0
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
There is an issue with learners using Visual Studio 2022 on Windows OS getting false test failures.
Failing tests:
TestTaskTwo.cs
- Test_Second_Location_Constructor_Initializes_Id
TestTaskFive.cs
- Test_TestToString_Starts_And_Ends_With_NewLine
- Test_TestToStringHandlesEmptyField
The test methods are written to expect a specific order of execution (the order the methods are written in code - VS2022 on Mac executes test methods this way), however, VS2022 on Windows runs the test methods alphabetically by method name. This is causing failures due to mismatching ID properties.
The two tests in TestTaskFive are also comparing output with text files created using \n as the line separator. These also fail on Windows due to the line separator being \r\n on that platform.
There is a PR to fix these issues: #1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review PR #1 alongside TestTaskTwo.cs and TestTaskFive.cs, then run the three listed tests in Visual Studio 2022 on Windows and Mac. Done means the constructor and ToString tests pass on both platforms without relying on test execution order or a platform-specific line separator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100