How to setup Xunit / nuget

Hi

How can I setup XUnit with continua ci ?

I found the xunit action. but when I set it to run my tests it keeps waitng and says : 

Stage Awaiting Agent
No agents are currently available to execute the stage. 
gp_dev: The expression [’$Agent.XUnit.clr4.Path$’ exists] evaluated False. ‘$Agent.XUnit.clr4.Path$’ does not exist. This may be because a required tool is not installed on the agent.

So I assume i need to install some XUnit Libraries on the server ?Why are they ? Is there a manual ?


I also tried to use the Nuget option but this says :

The expression [’$Agent.NuGet.Default.Path$’ exists] evaluated False. ‘$Agent.NuGet.Default.Path$’ does not exist. This may be because a required tool is not installed on the agent

So where should point this setting to ? Is there any documentation ? 

Hi Haggy,

I have updated the XUnit documentation today as it was out of date.

The XUnit console runner is installed using NuGet, you therefore need to download the NuGet command-line utility and save it to a folder on the agent first.

If "Install XUnit on agent using NuGet" is ticked, the action will preinstall XUnit using the nuget.exe picked up by the NuGet.Default property collector. Ensure the folder you saved nuget.exe to, is added to the environment PATH so that it is picked up by the property collector, or edit the property collector and add the folder to the search paths.

You can also choose to manually install the XUnit runner console to the agent by running the NuGet command line directly e.g. nuget install xunit.runner.console. You then need to ensure that xunit.console.exe is picked up by the XUnit property collector by adding the /xunit.runner.console/tools folder to the environment PATH or to the property collector search paths.