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

Gherkin related functions - partial lack of help #808

Closed
it-praktyk opened this issue Jul 31, 2017 · 13 comments
Closed

Gherkin related functions - partial lack of help #808

it-praktyk opened this issue Jul 31, 2017 · 13 comments

Comments

@it-praktyk
Copy link
Contributor

it-praktyk commented Jul 31, 2017

One of the biggest features of Pester v4 is the implementation of Gherking-style (is it a correct description?).

I checked a status of help for Gherkin related functions - I used for this https://github.com/it-praktyk/Pester/tree/DevV4_Addd_Tests_For_Help_2 - and help is not completed - results are listed below.

I think that it should be added before releasing of final Pester v4 version.

What do you think?

Guys - especially: @Jaykul, @adbertram, @KevinMarquette - help is needed.

    Context The function [Find-GherkinStep] - Help
      [-] Synopsis for the function is filled up 167ms
        Expected: value was {Find-GherkinStep [[}, but should not have been the same
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 43
        43:                     $HelpSynopsisBegin | Should Not Be "$Function [["
      [-] Description for the function is filled up 66ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 59
        59:                     $FunctionDescription | Should not BeNullOrEmpty
      [-] The parameter [BasePath] contains description 95ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] The parameter [Step] contains description 62ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] Example - At least one example exist 73ms
        Expected {0} to be greater than {0}
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 95
        95:                     $ExamplesCount | Should BeGreaterthan 0

    Context The function [Get-MockDynamicParameters] - Help
      [+] Synopsis for the function is filled up 176ms
      [-] Description for the function is filled up 58ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 59
        59:                     $FunctionDescription | Should not BeNullOrEmpty
      [-] The parameter [CmdletName] contains description 79ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] The parameter [FunctionName] contains description 57ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] The parameter [ModuleName] contains description 85ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] The parameter [Parameters] contains description 74ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [-] The parameter [Cmdlet] contains description 73ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty

    Context The function [GherkinStep] - Help
      [+] Synopsis for the function is filled up 118ms
      [+] Description for the function is filled up 42ms
      [+] The parameter [Name] contains description 60ms
      [+] The parameter [Test] contains description 65ms
      [-] Example - At least one example exist 63ms
        Expected {0} to be greater than {0}
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 95
        95:                     $ExamplesCount | Should BeGreaterthan 0

    Context The function [Invoke-Gherkin] - Help
      [+] Synopsis for the function is filled up 168ms
      [+] Description for the function is filled up 52ms
      [+] The parameter [FailedLast] contains description 63ms
      [+] The parameter [Path] contains description 76ms
      [+] The parameter [ScenarioName] contains description 65ms
      [+] The parameter [EnableExit] contains description 84ms
      [+] The parameter [Tag] contains description 63ms
      [+] The parameter [ExcludeTag] contains description 62ms
      [+] The parameter [CodeCoverage] contains description 78ms
      [+] The parameter [Strict] contains description 60ms
      [+] The parameter [OutputFile] contains description 54ms
      [+] The parameter [OutputFormat] contains description 67ms
      [+] The parameter [Quiet] contains description 62ms
      [+] The parameter [PesterOption] contains description 53ms
      [+] The parameter [Show] contains description 64ms
      [-] The parameter [PassThru] contains description 75ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 81
        81:                         $ParameterDescription | Should not BeNullOrEmpty
      [+] Example - At least one example exist 80ms
      [+] Example - remarks on [ EXAMPLE 1 ] are filled up 61ms
      [+] Example - remarks on [ EXAMPLE 2 ] are filled up 49ms
      [+] Example - remarks on [ EXAMPLE 3 ] are filled up 74ms
      [+] Example - remarks on [ EXAMPLE 4 ] are filled up 66ms
      [+] Example - remarks on [ EXAMPLE 5 ] are filled up 50ms
      [+] Example - remarks on [ EXAMPLE 6 ] are filled up 56ms
      [+] Example - remarks on [ EXAMPLE 7 ] are filled up 63ms

    Context The function [Invoke-GherkinStep] - Help
      [+] Synopsis for the function is filled up 143ms
      [-] Description for the function is filled up 57ms
        Expected: value to not be empty
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 59
        59:                     $FunctionDescription | Should not BeNullOrEmpty
      [+] The parameter [Step] contains description 61ms
      [+] The parameter [Visible] contains description 64ms
      [+] The parameter [Pester] contains description 60ms
      [-] Example - At least one example exist 62ms
        Expected {0} to be greater than {0}
        at <ScriptBlock>, C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Help.Tests.ps1: line 95
        95:                     $ExamplesCount | Should BeGreaterthan 0
@nohwnd
Copy link
Member

nohwnd commented Aug 1, 2017

Is this that crucial for the release? How many regular users of gherkin are there apart from Jaykul's team? Ten maybe? So how about we put it in 4.1?

@it-praktyk
Copy link
Contributor Author

@Jaykul, could you mark which Gherkin-related functions exported by Pester module shouldn't be directly invoked?

  • Invoke-Gherkin
  • Invoke-GherkinStep
  • Find-GherkinStep
  • GherkinStep
  • BeforeEachFeature
  • AfterEachFeature
  • BeforeEachScenario
  • AfterEachScenario

Thank you.

@Jaykul
Copy link
Contributor

Jaykul commented Oct 22, 2017

Invoke-Gherkin is the big kahuna, like Invoke-Pester
Invoke-GherkinStep should probably be private...

Find-GherkinStep is useful outside of tests.

The rest map roughly to the Pester functions, and are meant for use in .Steps.ps1 files like the Pester versions are only meant for use in .Tests.ps1 files

Gherkin Pester
GherkinStep It
BeforeEachFeature BeforeAll
AfterEachFeature AfterAll
BeforeEachScenario BeforeEach
AfterEachScenario AfterEach

@it-praktyk it-praktyk modified the milestones: v4.1, 4.2 Nov 11, 2017
@it-praktyk
Copy link
Contributor Author

it-praktyk commented Nov 19, 2017

The current situation

    Context The function [Find-GherkinStep] - Help
      [-] Example - At least one example exist 9ms
        Expected {0} to be greater than {0}
        103:                     $ExamplesCount | Should BeGreaterthan 0
        at Invoke-LegacyAssertion, <FOLDER_PATH>\Pester\Functions\Assertions\Should.ps1: line 190
        at <ScriptBlock>, <FOLDER_PATH>\Pester\Help.Tests.ps1: line 103

    Context The function [GherkinStep] - Help
      [-] Example - At least one example exist 10ms
        Expected {0} to be greater than {0}
        103:                     $ExamplesCount | Should BeGreaterthan 0
        at Invoke-LegacyAssertion, <FOLDER_PATH>\Pester\Functions\Assertions\Should.ps1: line 190
        at <ScriptBlock>, <FOLDER_PATH>\Pester\Help.Tests.ps1: line 103

Update

It can (?) be skipped if the function Invoke-GherkinStep will not be exported like I propose in the pull request #948.

    Context The function [Invoke-GherkinStep] - Help
      [-] Description for the function is filled up 12ms
        Expected: value to not be empty
        67:                     $FunctionDescription | Should not BeNullOrEmpty
        at Invoke-LegacyAssertion, <FOLDER_PATH>\Pester\Functions\Assertions\Should.ps1: line 190
        at <ScriptBlock>, <FOLDER_PATH>\Pester\Help.Tests.ps1: line 67
      [-] Example - At least one example exist 16ms
        Expected {0} to be greater than {0}
        103:                     $ExamplesCount | Should BeGreaterthan 0
        at Invoke-LegacyAssertion, <FOLDER_PATH>\Pester\Functions\Assertions\Should.ps1: line 190
        at <ScriptBlock>, <FOLDER_PATH>\Pester\Help.Tests.ps1: line 103

@it-praktyk
Copy link
Contributor Author

it-praktyk commented Nov 19, 2017

@Jaykul,
thank you for your answer.

Invoke-GherkinStep should probably be private...

Can you prepare the pull request which changes exported module member?

@it-praktyk
Copy link
Contributor Author

@Jaykul,
I prepared a pull request what I asked you about in the previous comment.

@nohwnd
Copy link
Member

nohwnd commented Nov 21, 2017

The PR #948 is merged.

@Jaykul
Copy link
Contributor

Jaykul commented Nov 21, 2017

Thanks guys, it's been a bit ... crazy over here.
I'll add examples for those two (GherkinStep and Find-GherkinStep)

@it-praktyk
Copy link
Contributor Author

@Jaykul, can I ask for these examples?

I just opened the pull request #955 what contains tests to validate help completions.

@it-praktyk
Copy link
Contributor Author

@Jaykul, gentle reminder. Thank you.

KevinMarquette added a commit to KevinMarquette/Pester that referenced this issue Feb 19, 2018
KevinMarquette added a commit to KevinMarquette/Pester that referenced this issue Feb 19, 2018
@KevinMarquette
Copy link
Contributor

I went ahead and created a few simple examples for these commands.

@it-praktyk
Copy link
Contributor Author

Thank you @KevinMarquette!

nohwnd pushed a commit that referenced this issue Feb 20, 2018
* #808 add GherkinStep examples

* correct .EXAMPLE
@it-praktyk
Copy link
Contributor Author

Completed, #994, #995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants