Rank: Newbie
Groups: Registered
Joined: 6/16/2016(UTC) Posts: 1 Location: United States of America
|
We are hitting the classic issue: Files needed in the test env are not included in the build output. Full error below.
But we do not know how to approach this!
Flow: cs code reference files on disk (excel xls files). These files are imported into a sqllite file, and then the cs code runs against sqllite
When we run in vs under nunit or testdriven.net, the tests run and pass.
But in ncrunch, we get the error below.
ncrunch is right (because the files are not in the project reference). But they need to both be included AND in the right location for it all to work.
Questions: Sooooo, we need to understand how to add references to the xls files so that:
a) Code will still run and test and find the xls files when run locally (files will be off in some path from version control, not in dir next to cs)
b) xls is included so ncrunch can see them
c) What compiler directives do we use so that when ncrunch compiles, the cs will look in different location?
d) How can we see/understand the ncrunch run time env? We need to know so we can make appro adjustments in code (prob under compiler directives that only fire when running under ncrunch)
Thanks!
Quote: System.ApplicationException : Unable to import data from '..\..\..\sourcedata\2016\BaseData48States.xls', sheet: main-excel_Z . Directory "..\..\..\sourcedata\2016" does not exixt. at testapplication.Rating.LoaderBaseRatesFromExcelData.LoadRateCharts(CensusBaseRateDatabase baseRateDatabase, String ratesFilename, String xlsSheet, TCensusService service, List`1 zoneNames) in C:\Develop\testapplication\Current\WebApplications\testapplicationWeb\testapplication.Rating\testapplication.Rating.Core\Census\DataLoader\LoaderBaseRatesFromExcelData.cs:line 230 at testapplication.Rating.LoaderBaseRatesFromExcelData.Loadmain-excel_Z(CensusBaseRateDatabase baseRateDatabase, String path) in C:\Develop\testapplication\Current\WebApplications\testapplicationWeb\testapplication.Rating\testapplication.Rating.Core\Census\DataLoader\LoaderBaseRatesFromExcelData.cs:line 46 at testapplication.Rating.LoaderBaseDataAbstract.LoadRatesAll(String path, String ratesDatabaseFileName) in C:\Develop\testapplication\Current\WebApplications\testapplicationWeb\testapplication.Rating\testapplication.Rating.Core\Census\DataLoader\LoaderBaseDataAbstract.cs:line 99 at testapplication.Rating.A_RunFirst.LoadingCensusDataTests_2016.A_LoadBaseRates() in C:\Develop\testapplication\Current\WebApplications\testapplicationWeb\testapplication.Rating\testapplication.Rating.Tests.RunOnBuildBox\Census\LoadingCensusDataTests_2016.cs:line 98
|