exercism/website-copy

disabling skip

Closed this issue · 9 comments

Hi guys, I've been on exercism.io all day today. One thing that really bothers be is the "dotnet test" testing part of the exercise.
It works fine for the first test but... In the command prompt it notes "FAILED: 0 PASSED: 1 SKIPPED: 5" for example.

The testing description says something about disabling the "Skips" but the description is trash.. Quite frankly that means that people are not testing properly in the logical side.

I suggest taking off that "Skip" feature when using "dotnet test". It's confusing and I think impossible to disable.

Only Much Love and Respect,
BlitzZanarkand

kotp commented

What track are you working on? I want to move this to the relevant track, because this issue isn't universal to all tracks.

I'm on csharp track but its the "dotnet test" command i'm complaining about

Sorry if my explaination is poor. 😞

kotp commented

Thanks, I can draw attention from that track to here for you.

The testing description says something about disabling the "Skips" but the description is trash.. Quite frankly that means that people are not testing properly in the logical side.

I suggest taking off that "Skip" feature when using "dotnet test". It's confusing and I think impossible to disable.

The Skip feature is a deliberate decision and one that many tracks on Exercism adhere to. The idea is that we want to have people solve exercises in a TDD style, which means doing the red/green/refactor cycle for one test at a time. Our exercises are designed to accomodate this behavior.

As for it being confusing, we have a paragraph in each exercise's README that explains the Skip behavior:

Initially, only the first test will be enabled. This is to encourage you to solve the exercise one step at a time.
Once you get the first test passing, remove the Skip property from the next test and work on getting that test passing.
Once none of the tests are skipped and they are all passing, you can submit your solution
using exercism submit {{ .Spec.MixedCaseName }}.cs

Each test case's Skip attribute also explicitly mentions that the Skip property can be removed.

TL;DR The Skip attribute is due to a deliberate, Exercism-wide decision which the C# track adheres to.

Ohhhhh 🤦‍♂️🤦‍♂️ I See... Lets just pretend you're an idiot like me.

Initially, only the first test will be enabled. This is to encourage you to solve the exercise one step at a time. Once you get the first test passing, remove the Skip property from the next test and work on getting that test passing. Once none of the tests are skipped and they are all passing, you can submit your solution using exercism submit {{ .Spec.MixedCaseName }}.cs

This makes no sense to beginners because scrubs don't know about the {Spec.CaseName}Test.cs file.
So maybe in description you guys could add Once you get the first test passing, remove the Skip property which is inside the {Spec.CaseName}Tester.cs file.... instead 🤷

kotp commented

I don't see that in the README.md file, I see this:

## Running the tests

To run the tests, run the command `dotnet test` from within the exercise directory.

Initially, only the first test will be enabled. This is to encourage you to solve the exercise one step at a time.
Once you get the first test passing, remove the `Skip` property from the next test and work on getting that test passing.
Once none of the tests are skipped and they are all passing, you can submit your solution
using `exercism submit HelloWorld.cs`

So, I think that you are saying that your README did not get delivered intact?

Or is it presenting this way in the "Instructions" tab on the website?

For me, again on the "Hello World" exercise, I see this in the instructions tab:

To run the tests, run the command dotnet test from within the exercise directory.

Initially, only the first test will be enabled. This is to encourage you to solve
the exercise one step at a time. Once you get the first test passing, remove
the Skip property from the next test and work on getting that test passing.
Once none of the tests are skipped and they are all passing, you can submit
your solution using exercism submit HelloWorld.cs

So the file name translates as it should for me.

I am looking at "Language tracks → C# track → Hello World" in the browser for the browser side view, and the locally delivered README.md file for the same information.

This exercise, though, does not have any tests to "unskip" because it is the one that ensures that you can submit to the platform.

For another exercise, where we have tests to unskip, the result is similar, with the test file having something like:

// This file was auto-generated based on version 2.3.0 of the canonical data.

using System;
using Xunit;

public class HammingTests
{
    [Fact]
    public void Empty_strands()
    {
        Assert.Equal(0, Hamming.Distance("", ""));
    }

    [Fact(Skip = "Remove this Skip property to run this test")]
    public void Single_letter_identical_strands()
    {
        Assert.Equal(0, Hamming.Distance("A", "A"));
    }

The first test having the part not there that would need to be removed from the second and subsequent tests. Namely the (Skip = "Remove this Skip property to run this test") which is missing from the first test.

Are you willing to submit an issue on the C Sharp repository, and discuss and hopefully submit a patch to make the change you would like to see to help make this clearer?

There is no more issue anymore. I'm just stupid.

Initially the problem was my ignorance. I have no experience with TDD and Unit testing. 😕

For the ignorant ones(like me), I'm proposing we add little more exact instructions for testing.

Don't waste too much time on me. That is all.

kotp commented

I am asking you if you have time to help others by making change, to help others that might be in the position to not pick up what we did not see would cause someone to not make the trip successfully. I am not offering to make the change, but I wanted to know if you would be willing to. We can help you get a successful contribution and maybe prevent someone else from missing the information.

kotp commented

After all, this site is for those new to those individual languages, and so it is expected that many won't know what the test files look like, etc.