I have total 688 unit tests written in my project. When I am running these unit tests on my local development environment then these all are passing successfully but when I am running these unit tests on Jenkins Server then 57 unit tests are failing out of 688.
I'm new in Jenkins so I'm confused what to do with this because if these issue would come on my local environment then I will definitely try to fix it but in Jenkins, I'm not getting any clue, what to do.
below is the 2 full stack trace which is generating while building through Jenkins:
1.)
MESSAGE:
System.ServiceModel.FaultException : Could not load file or assembly 'Store.Common,
Version=21.1.4766.0, Culture=neutral, PublicKeyToken=bc4823754db87e14' or one of its dependencies.
The system cannot find the file specified.
+++++++++++++++++++
STACK TRACE:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&
rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway,
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,
ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Store.ExternalApi.Proxy.IDocumentHandlingService.Search(SearchRequest request)
at Store.ExternalApi.Proxy.IDocumentHandlingService.Search(SearchRequest request) in
D:\Dev\Server\mainline\ExternalApi\ExternalApiProxy\DocumentHandlingServiceClient.cs:line 416
at Store.ExternalApi.Tests.WebService.DestroyTests.DestroySearchWebMethod() in
D:\Dev\Server\mainline\ExternalApi\ExternalApiTests\WebService\DestroyTests.cs:line 26
2.)
MESSAGE:
System.TimeoutException : The request channel timed out while waiting for a reply after
00:00:59.9990195. Increase the timeout value passed to the call to Request or increase the
SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a
longer timeout.
----> System.TimeoutException : The HTTP request to
'http://localhost/ExternalApiWebService/DocumentHandlingService.svc' has exceeded the allotted
timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.
----> System.Net.WebException : The operation has timed out
+++++++++++++++++++
STACK TRACE:
Server stack trace:
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway,
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,
ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Store.ExternalApi.Proxy.IDocumentHandlingService.
StoreNewVersionedDocument(StoreNewVersionedDocumentRequest request)
at Store.ExternalApi.Proxy.DocumentHandlingServiceClient.
Store.ExternalApi.Proxy.IDocumentHandlingService.
StoreNewVersionedDocument(StoreNewVersionedDocumentRequest request) in
D:\Dev\Server\mainline\ExternalApi\ExternalApiProxy\DocumentHandlingServiceClient.cs:line 80
Below is my web.config file of ExternalAPI project:
<basicHttpsBinding>
<binding name="DocumentHandlingHttpsBinding" openTimeout="00:10:00" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
</binding>
</basicHttpsBinding>
<basicHttpBinding>
<binding name="DocumentHandlingHttpBinding" openTimeout="00:10:00" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
</binding>
<binding name="TransferServiceHttpBinding" sendTimeout="00:25:00" maxBufferSize="2147483647"
maxReceivedMessageSize="9223372036854775807" transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security>
<message clientCredentialType="UserName" />
</security>
</binding>
<binding name="TransferServiceWindowsHttpBinding" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="9223372036854775807" transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security>
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="DocumentHandlingTcpBinding" openTimeout="00:10:00" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
</binding>
<binding name="StoreTcpBinding" openTimeout="00:10:00" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security mode="Message">
<transport clientCredentialType="None" protectionLevel="None" />
<message clientCredentialType="UserName" />
</security>
</binding>
<binding name="StoreWindowsTcpBinding" openTimeout="00:10:00" sendTimeout="01:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
<binding name="TransferServiceTcpBinding" sendTimeout="01:10:00" transferMode="Streamed"
maxBufferSize="2147483647" maxReceivedMessageSize="9223372036854775807">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security mode="None">
<transport clientCredentialType="None" protectionLevel="None" />
<message clientCredentialType="UserName" />
</security>
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="StoreHttpBinding" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security>
<message clientCredentialType="UserName" />
</security>
</binding>
<binding name="StoreWindowsHttpBinding" sendTimeout="00:10:00"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="536870912"
/>
<security>
<message clientCredentialType="Windows" />
</security>
</binding>
<!--HTTPS-->
<binding name="StoreHttpsBinding" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="104857600"
/>
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" establishSecurityContext="true"
algorithmSuite="Default" />
</security>
</binding>
<binding name="StoreWindowsHttpsBinding" sendTimeout="00:10:00"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="104857600"
/>
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
Below is ExternalAPITest.config file: My all unit test cases are written in ExternalAPITest project:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Store.ExternalApi.Tests.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<Store.ExternalApi.Tests.Properties.Settings>
<setting name="StoreUserName" serializeAs="String">
<value>syspassword</value>
</setting>
<setting name="StorePassword" serializeAs="String">
<value>syspassword</value>
</setting>
</Store.ExternalApi.Tests.Properties.Settings>
</applicationSettings>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="StoreClientEndpointBehaviour">
<dataContractSerializer maxItemsInObjectGraph="104857600" />
<clientCredentials>
<serviceCertificate>
<authentication certificateValidationMode="None" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="DocumentHandlingServiceBinding" />
<binding name="TransferServiceHttpBinding" sendTimeout="00:10:00"
maxBufferSize="2147483647" maxReceivedMessageSize="9223372036854775807"
transferMode="Streamed">
<readerQuotas maxDepth="256" maxStringContentLength="104857600"
maxArrayLength="536870912" />
<security>
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="StoreHttpBinding" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="256" maxStringContentLength="104857600" maxArrayLength="104857600"/>
<security>
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<!-- new API service -->
<endpoint address="http://localhost/ExternalApiWebService/DocumentHandlingService.svc"
binding="basicHttpBinding" bindingConfiguration="DocumentHandlingServiceBinding"
contract="IDocumentHandlingService" name="DocumentHandlingService" />
<!-- internal API services so that tests can talk to Store directly -->
<endpoint address="http://localhost:8000/AuthorizationManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IAuthorizationManager"
name="AuthorizationManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX" />
</identity>
</endpoint>
<endpoint address="http://localhost:8000/ConfigurationManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IConfigurationManager2"
name="ConfigurationManagerHttp">
<identity>
<certificate encodedValue="AwAAAAEAAAAUAAAAr4cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/DataDefinitionManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IDataDefinitionManager2"
name="DataDefinitionManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/DataDefinitionManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IFieldTypeManager"
name="FieldTypeManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/DataItemManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IDataItemManager4"
name="DataItemManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/InternalDocumentHandlingService"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.ExternalApi.IInternalDocumentHandlingService"
name="InternalDocumentHandlingServiceHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/MembershipManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IMembershipManager"
name="MembershipManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/SearchTemplateManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.ISearchTemplateManager6"
name="SearchTemplateManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/StorageManager/"
behaviorConfiguration="StoreClientEndpointBehaviour" binding="wsHttpBinding"
bindingConfiguration="StoreHttpBinding" contract="Store.IStorageManager"
name="StorageManagerHttp">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
<endpoint address="http://localhost:8000/TransferService/" behaviorConfiguration="StoreClientEndpointBehaviour"
binding="basicHttpBinding" bindingConfiguration="TransferServiceHttpBinding"
contract="HitecLabs.TransferManager.Common.ITransferService"
name="TransferService">
<identity>
<certificate encodedValue="cvpnc2MzsCp/KG6qFpMVEC3XXX
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
I tried increasing SendTimeOut but no luck,I have searched the relevant answers from google but it didn't helped in my case.
Can anyone suggest me, please ?