Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Run not run tests are not running previously not run tests #71

Closed
sswaroopgupta opened this issue May 17, 2016 · 1 comment
Closed

Run not run tests are not running previously not run tests #71

sswaroopgupta opened this issue May 17, 2016 · 1 comment
Labels

Comments

@sswaroopgupta
Copy link
Contributor

Expected behavior
It should run previously not run test

Actual behavior
Run not run tests are not running previously not run tests

Steps to reproduce

  1. Create a project with a basic spec
Specification Heading
=====================

     |vowels|
     |------|
     |aeiou |
     |sdf   |

This is an executable specification file. This file follows markdown syntax.
Every heading in this file denotes a scenario. Every bulleted point denotes a step.
To execute this specification, run
    gauge specs

* Vowels in English language are "sdf".
* Vowels<vowels>.

Vowel counts in single word p
---------------------------
tags: single word
* The word "gauge" has "4" vowels.

Vowel counts in multiple word
-----------------------------
This is the second scenario in this specification
Here's a step that takes a table
* Almost all words have vowels 

     |Word  |Vowel Count|
     |------|-----------|
     |Gauge |3          |
     |Mingle|2          |
     |Snap  |1          |
     |GoCD  |1          |
     |Rhythm|0          |

  1. with implementation
    public class StepImplementation
    {
        private HashSet<char> _vowels;

        [Step("Vowels in English language are <vowelString>.")]
        public void SetLanguageVowels(string vowelString)
        {
            _vowels = new HashSet<char>();
            foreach (var c in vowelString)
            {
                _vowels.Add(c);
            }
        }

        [Step("The word <word> has <expectedCount> vowels.")]
        public void VerifyVowelsCountInWord(string word, int expectedCount)
        {
            var actualCount = CountVowels(word);
            actualCount.Should().Be(expectedCount);
        }

        [Step("Almost all words have vowels <wordsTable>")]
        public void VerifyVowelsCountInMultipleWords(Table wordsTable)
        {
            var rows = wordsTable.GetTableRows();
            foreach (var row in rows)
            {
                var word = row.GetCell("Word");
                var expectedCount = Convert.ToInt32(row.GetCell("Vowel Count"));
                var actualCount = CountVowels(word);

                actualCount.Should().Be(expectedCount);
            }
        }

        private int CountVowels(String word)
        {
            return word.Count(c => _vowels.Contains(c));
        }

        [Step("Vowels<sdf>.")]
        public void Vowelssdf(string sdf)
        {
            Console.WriteLine("inside definition");
        }
    }

  1. Build the solution
  2. Run one test from test explorer.
  3. Now run not run tests
  4. It repeats only previously run tests.

Version

VS 0.2.1
Gauge version: 0.4.1.nightly-2016-05-16

Plugins
-------
csharp (0.7.3.nightly-2016-05-16)
html-report (2.1.0)
@kashishm
Copy link
Collaborator

This issue was moved to getgauge/gauge-visualstudio#121

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants