Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ivanosw1"

Ok, I clear what you say but doesn't work yet. I restarted from scratch adding to your template a very simple module with one table, and one methods. The module works good, but I'm struggling with tests.

Has you know, tests are necessary for our definition of done, and also because test are necessary ! dot. :-)

How can I give you the elements in order to resolve my issues? Maybe I can send by email my project?

Thanks.

You are right. I try to explain better. The scenario is:

  • One solution with AbpZero template that runs as web host for all services. Nobody (developer) can touch this solution. The only edit is the configuration of plugin modules directory.
  • Team A owns a solution with one plugin module like Reports.
  • Team B owns a solution with one plugin module like Health.
    Both solutions references only Abp and AbpZero nuget packages and there are Application,Core and EntityFramework projects.

So far so good. The plugins copyed on Web Host works good.

Now I want to implement unit and integration tests in Team A and Team B project. Following the steps to build a test project, I can't execute nothing related to database context. At startup I have the error mentioned in previous post : Value cannot be null. Parameter name: value in Abp.Zero.Configuration.AbpZeroEntityTypes.set_Tenant(Type value) in Abp.Zero.AbpZeroCoreModule.FillMissingEntityTypes()

The question is: how can I setup the environment needed by Abp (Host, Tenant, Seed, and so on), being in a different solution than template ?

If you need, I can create a simple module solution that replicate the problem.

Thanks.

News about this topic? Do you have some suggestion @hikalkan ?

Just tryed and It works !

Thank you @ismcagdas..

Hi, I'm testing our service using Postman calls but I can't set the user language neither with cookies nor header. For example, a call to <a class="postlink" href="http://server/AbpUserConfiguration/GetAll">http://server/AbpUserConfiguration/GetAll</a> passing in headers Abp.Localization.CultureName=de reply always on browser culture or default culture if the call is made by c# client. If I use your angular2 app the and I click on some flags, the language is correctly set based on cookies. What I'm missing ?

Thanks

You are right. I'm using the name of the template as title. Sorry, my fault. I'm gone ahead: resolved the " Abp.AspNetCore.Configuration.IAbpAspNetCoreConfiguration" error. I found an unused Configuration.Modules.AbpAspNetCore().CreateControllersForAppServices(typeof(myApplicationModule) .Assembly);

Now I've this error: Value cannot be null. Parameter name: value in Abp.Zero.Configuration.AbpZeroEntityTypes.set_Tenant(Type value) in Abp.Zero.AbpZeroCoreModule.FillMissingEntityTypes()

I guess the framework needs that some table are prefilled before test and I guess that work is done on AppTestBase with
new InitialHostDbBuilder(context).Create();, new DefaultTenantBuilder(context).Create(); and so on. My plugin is unaware of security and has his own context. How can I provide the missing base data ?

Thanks

Thank you hikalkan. I saw your suggestions but all refer to web test project Acme.SimpleTaskApp.Web.Tests. I'm talking about the project Acme.SimpleTaskApp.Tests. This project doesn't import AbpAspNetCoreTestBaseModule or controller. I don't figure why an identical project with the only difference in referenced application projects doesn't work in a plugin solution. Or better: I'm using EF6, not EFCore

The bin folder of your test contains only those assembly of Abp: Abp.AutoMapper.dll, Abp.dll, Abp.EntityFramework.Common.dll, Abp.EntityFrameworkCore.dll, Abp.TestBase.dll

It may be possible to have a simple plugin project with App, Core, EF6 and tests as example? Or can I send you my project ?

Thanks

Yes sure. Sorry for my incorrect transcript. My test module depends correctly on [DependsOn( typeof(MyApplicationModule), typeof(MyEntityFrameworkModule), typeof(AbpTestBaseModule))] public class MyTestModule : AbpModule

I've just download the git repo of samples and now all Acme.SimpleTaskApp.Tests are green. I've copyed all reference to my tests, plus "Microsoft.DotNet.InternalAbstractions": "1.0.0", but I have still the same error. Note that I'm testing a plugin that has his own solution and works fine on production. Need I create some fake web site or similar ?

Thanks

Hi, I'm trying to set up a test project with aspnet core zero v. 3.2.0.0 and abp 1.5. A very very simple test on separate module project gives me the error: No component for supporting the service Abp.AspNetCore.Configuration.IAbpAspNetCoreConfiguration was found.

I've copied from Framework project test the file project.json, and I've created this simple classes:

public class AppTestBase : AbpIntegratedTestBase<MyTestModule>
    {
    }
public classMyTestModule : AbpModule
    {
    }
public class MyTests : AppTestBase
    {

        [Fact]
        public void Shuold_Execute()
        {
            var myValue= 1;
            myValue.ShouldBe(1);
        }
    }

Also your sample project SimpleTaskSystem-Core gives me the same error. What I'm missing ? Thanks

Great ismcagdas ! It works

Thank you so much.

Showing 151 to 160 of 178 entries