0

I am making WinForm application for .Net Core project to generate test documentation.

I want to 1) execute dotnet test 2) generate pickles documentantion json file from xml and feature files 3) create custom xml from that file.

I am able to execute tests ang generate TestResults.xml, i.e. # dotnet test --logger:xunit -r ../TestResults/

        var process = new Process();
        process.StartInfo.FileName = "powershell.exe";
        process.StartInfo.Arguments = $"/C cd {solution_directory};" +
            "dotnet test --logger:xunit -r ../TestResults/;"

Now I try to run Pickles-Features for generated xml and feature files of Project. But it's not available with the same technique

Pickle-Feature : The term 'Pickle-Feature' is not recognized as the name of a cmdlet, function, script file, or operable program.

I installed it via Nuget but this didn't work.

How can I use it in my form?

Rasul
  • 121
  • 2
  • 3
  • 7

1 Answers1

0

I was able to run it from default nuget packages installation directory.

var userDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
var pickles = userDirectory + "\\.nuget\\packages\\pickles.commandline\\2.20.1\\tools\\pickles.exe";
var arguments = $" -f={featuresDirectory}" +
            $" -o={reportsOutputDirectory}" +
            $" --link-results-file={reportsOutputDirectory}/TestResults.xml" +
            " --test-results-format=xunit2" +
            " --documentation-format=json";
Rasul
  • 121
  • 2
  • 3
  • 7