microsoft / wopi-validator-core

A tool to test and validate server-side WOPI implementations
MIT License
42 stars 33 forks source link

Can't run tests #107

Closed Dedrus closed 2 years ago

Dedrus commented 2 years ago

When I'm trying to run tests, I receive the next error: Used command from readme: dotnet run --project ./src/WopiValidator/WopiValidator.csproj --framework net6.0 -- -t MyAccessToken -l 0 -w http://localhost:8402/wopi/files/<id> -e OfficeOnline -s

System.ArgumentException: Could not find a prereq test case named {0} (Parameter 'SupportsCoauthPrereq') at Microsoft.Office.WopiValidator.Core.Factories.TestCaseFactory.GetPrereqTests(XElement definition, Dictionary2 prereqsDictionary)+MoveNext() in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator.Core\Factories\TestCaseFactory.cs:line 43 at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Microsoft.Office.WopiValidator.Core.ConfigParser.GetTestExecutionDataForGroup(XElement definition, Dictionary2 prereqCasesDictionary, ITestCaseFactory testCaseFactory, IResourceManager resourceManager, TestCategory targetTestCategory) in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator.Core\ConfigParser.cs:line 52 at Microsoft.Office.WopiValidator.Core.ConfigParser.<>c__DisplayClass1_0.<ParseExecutionData>b__1(XElement x) in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator.Core\ConfigParser.cs:line 38 at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Lookup2.Create(IEnumerable1 source, Func2 keySelector, IEqualityComparer1 comparer) at System.Linq.GroupedEnumerable2.GetEnumerator() at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at Microsoft.Office.WopiValidator.Program.Execute(Options options) in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator\Program.cs:line 98 at Microsoft.Office.WopiValidator.Program.<>c.

b__1_0(Options options) in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator\Program.cs:line 46 at CommandLine.ParserResultExtensions.MapResult[TSource,TResult](ParserResult1 result, Func2 parsedFunc, Func`2 notParsedFunc) at Microsoft.Office.WopiValidator.Program.Main(String[] args) in C:\Users\anikolaev\dev\wopi-validator-core\src\WopiValidator\Program.cs:line 44

mikeebowen commented 2 years ago

Hi @Dedrus , You need to change <id> to the id of your .wopitest file for your WOPI server. Also, I believe OfficeOnline should be All, so the command would be dotnet run --project ./src/WopiValidator/WopiValidator.csproj --framework net6.0 -- -t YourAccessToken -l 0 -w http://localhost:8402/wopi/files/<id of your .wopitest file> -e All -s

Dedrus commented 2 years ago

@mikeebowen thanks for help!