c# - Specflow+ Runner Error - Unable to find asseembly -
i decided use specrunner execute specflow/selenium tests. before change, test executed fine. change receive following error:
system.reflection.reflectiontypeloadexception: unable load 1 or more of requested types. retrieve loaderexceptions property more information.
we use page-object model in our selenium tests in pass name of page in step , code fetches appropriate .cs file test functions relates webpage.
here function:
protected static ienumerable<type> pages { { return _pages ?? (_pages = appdomain.currentdomain.getassemblies().selectmany(a => a.gettypes()).where( t => typeof(ipage).isassignablefrom(t)).tolist()); } } protected static type getpagetype(string page) { var pagetype = pages.where(p => p.name.equals(page, stringcomparison.invariantcultureignorecase)).firstordefault(); return pagetype; }
we want implement parallel execution within our test suite. appreciated.
here`s snippets of specflow .srprofile:
<execution stopafterfailures="3" testthreadcount="7" testschedulingmode="sequential" apartmentstate="unknown" /> <environment testthreadisolation="sharedappdomain" apartmentstate="unknown"/>
Comments
Post a Comment