Activities of "Rishi1532"

Hi ABP Support Team,

We are currently facing an issue while running Cypress automation tests in our ABP-based application.

Setup Details:

  • We have deployed the project with two separate subdomains:

      * One for the frontend (Angular).
    
      * Another for the backend (ABP MVC API).
    
  • The application works perfectly when accessed through a regular browser (manually).

  • We are using the Cypress for automated end-to-end testing.

Problem:

When performing POST requests via Cypress (e.g., creating a role), we consistently receive a 400 Bad Request response from the backend API. However, the same operations succeed when done manually through the UI in a regular browser.

Observations:

  • GET requests work fine through Cypress.

  • The issue only arises for POST/PUT operations (e.g., creating roles).

  • Screenshot and Cypress test snippet are attached for reference. /// <reference types="cypress" /> import { Data } from "../../../fixtures/data.model";

describe('Administration > Security Management > Roles', { scrollBehavior: false }, () => { let data: Data; const baseUrl = Cypress.config().baseUrl; const testData = { role_name: "cypress role " + new Date().getTime(), role_sidebar_text: 'Roles', role_sidebar_url: '/identity-management/roles' } before(function () { cy.fixture("example").then((res) => { data = res; }); });

beforeEach(() => {

    cy.visit({ url: baseUrl, failOnStatusCode: false });
    cy.visit({ url: baseUrl, failOnStatusCode: false });
    cy.contains("Login", { matchCase: false, timeout: 30000 })
        .eq(0)
        .should("exist")
        .scrollIntoView()
        .click({ force: true });

    cy.wait(1000);
    // Input creds 
    cy.get('[id="LoginInput_UserNameOrEmailAddress"]').type(data.username, { delay: 20 });
    cy.get('[id="password-input"]').type(data.password, { delay: 20 });
    cy.wait(1000);

    cy.contains("Login", { matchCase: false, timeout: 30000 })
        .eq(0)
        .should("exist")
        .scrollIntoView()
        .click({ force: true });

    cy.contains("Home", { matchCase: false, timeout: 30000 })
        .eq(0)
        .should("exist")
        .scrollIntoView()
        .click({ force: true });
    cy.wait(1000);
    cy.log("✅ Passed ")

});

after(() => {
    // cy.clearLocalStorage();
    // cy.clearCookies();
});

it("should create a role", () => {
    const exactRegex = new RegExp(^${testData.role_sidebar_text}$, 'i');
    cy.log("✅ Visiting -> " + exactRegex)
    cy.contains(exactRegex, { matchCase: false, timeout: 30000 })
        .should('exist')
        .eq(0)
        .scrollIntoView()
        .click({ force: true });

    cy.wait(1000);

    cy.url().should('include', testData.role_sidebar_url);
    cy.wait(1000);

    // On role page
    cy.contains("New role", { matchCase: false, timeout: 30000 })
        .eq(0)
        .should("exist")
        .scrollIntoView()
        .click({ force: true });

    cy.get(".modal-content", { timeout: 20000 })
        .contains("New role", { matchCase: false })
        .should("exist")
        .scrollIntoView()
    cy.wait(2000)

    cy.get('.modal-content', { timeout: 10000 })
        .contains('label', 'Role name', { matchCase: false }) // find the label by text
        .parent()                            // go to the parent of the label
        .find('input')                       // find the input inside that parent
        .first()                             // select the first input (if multiple)
        .scrollIntoView()
        .type(testData.role_name, { force: true });

    cy.get(".modal-content", { timeout: 20000 })
        .contains("Public", { matchCase: false })
        .should("exist")
        .scrollIntoView()
        .click({ force: true });

    const createRole = "createRole"
    // cy.intercept("POST", "/api/identity/roles/").as(createRole);
    cy.wait(1000)
    cy.contains("Save", { matchCase: false, timeout: 30000 })
        .eq(0)
        .should("exist")
        .scrollIntoView()
        .click({ force: true });
    // cy.wait("@" + createRole, { timeout: 60000 }).its("response.statusCode").should("eq", 200);
    cy.wait(1000)
    cy.log("❌ tests failing due to server's incorrect response")
})


it("should look for a role", () => {
    const exactRegex = new RegExp(^${testData.role_sidebar_text}$, 'i');
    cy.log("✅ Visiting -> " + exactRegex)
    cy.contains(exactRegex, { matchCase: false, timeout: 30000 })
        .should('exist')
        .eq(0)
        .scrollIntoView()
        .click({ force: true });

    cy.wait(1000);

    cy.url().should('include', testData.role_sidebar_url);
    cy.wait(1000);

    const getRole = "getRole"
    cy.intercept("GET", "/api/identity/roles**").as(getRole);
    // On role page
    cy.get('input[placeholder="Search"]')
        .should('exist')
        .eq(0)
        .scrollIntoView()
        .type('cypress', { force: true });
    cy.wait("@" + getRole, { timeout: 60000 }).its("response.statusCode").should("eq", 200);
    cy.get('[role="table"]')
        .contains('cypress')
        .eq(0)
        .scrollIntoView()
        .should('be.visible');

});

});

Request:

Could you please assist us in identifying what may be causing this issue specifically for Cypress and how to resolve it within the ABP framework setup (e.g., configuration changes, headers, etc.)?

Thank you in advance for your help!

Best regards, Tuniki Rishikesh AUMTECH

[maliming] said: hi

The latest 8.x version is 8.3.4

https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore/8.3.4

Your code seems to have no problem. You can run it. Feel free to provide feedback on any exceptions/problems.

Thanks.

hi, Thanks this solved my issue

Hi

Additionally, I’ve updated the DbContextFactory and EntityFrameworkCoreModule files to use .UseNTi(...) as per the Aumerial provider's documentation. Could you kindly confirm if these changes will work as expected, or if there’s anything else I need to adjust for full compatibility?


DbContextFactory

using System.IO; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Configuration; using Aumerial.EntityFrameworkCore; // Check Aumerial's NuGet package

namespace NTIDemo.EntityFrameworkCore;

public class NTIDemoDbContextFactory : IDesignTimeDbContextFactory<NTIDemoDbContext> { public NTIDemoDbContext CreateDbContext(string[] args) { var configuration = BuildConfiguration();

    NTIDemoEfCoreEntityExtensionMappings.Configure();

    var builder = new DbContextOptionsBuilder&lt;NTIDemoDbContext&gt;()
        .UseNTi(configuration.GetConnectionString("Default")); // Replace with Aumerial's method

    return new NTIDemoDbContext(builder.Options);
}

private static IConfigurationRoot BuildConfiguration()
{
    var builder = new ConfigurationBuilder()
        .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../NTIDemo.DbMigrator/"))
        .AddJsonFile("appsettings.json", optional: false);

    return builder.Build();
}

}


EntityFrameworkCoreModule

using System; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Uow; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.OpenIddict.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.LanguageManagement.EntityFrameworkCore; using Volo.FileManagement.EntityFrameworkCore; using Volo.Abp.TextTemplateManagement.EntityFrameworkCore; using Volo.Saas.EntityFrameworkCore; using Volo.Abp.Gdpr; using Volo.Chat.EntityFrameworkCore; using Volo.Abp.Studio; using Aumerial.EntityFrameworkCore; using Microsoft.Extensions.Configuration;

namespace NTIDemo.EntityFrameworkCore;

[DependsOn( typeof(NTIDemoDomainModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpBackgroundJobsEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpIdentityProEntityFrameworkCoreModule), typeof(AbpOpenIddictProEntityFrameworkCoreModule), typeof(LanguageManagementEntityFrameworkCoreModule), typeof(FileManagementEntityFrameworkCoreModule), typeof(SaasEntityFrameworkCoreModule), typeof(ChatEntityFrameworkCoreModule), typeof(TextTemplateManagementEntityFrameworkCoreModule), typeof(AbpGdprEntityFrameworkCoreModule), typeof(BlobStoringDatabaseEntityFrameworkCoreModule) )] public class NTIDemoEntityFrameworkCoreModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { // https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic

    NTIDemoEfCoreEntityExtensionMappings.Configure();
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
    context.Services.AddAbpDbContext&lt;NTIDemoDbContext&gt;(options =>
    {
            /* Remove "includeAllEntities: true" to create
             * default repositories only for aggregate roots */
        options.AddDefaultRepositories(includeAllEntities: true);
    });

    if (AbpStudioAnalyzeHelper.IsInAnalyzeMode)
    {
        return;
    }

    Configure&lt;AbpDbContextOptions&gt;(options =>
    {
        options.Configure&lt;NTIDemoDbContext&gt;(context =>
        {
            var configuration = context.ServiceProvider.GetRequiredService&lt;IConfiguration&gt;();
            context.DbContextOptions.UseNTi(configuration.GetConnectionString("Default"));
        });
    });



}

}

Looking forward to your guidance.

Best regards, Rishikesh

Hi Thank you for the helpful responses.

Since the Aumerial.EntityFrameworkCore provider is compatible with EF Core 8, I understand that I’ll need to downgrade my ABP solution to an earlier version that also uses EF Core 8.

Could you please confirm which ABP Framework version (e.g., 8.x.x) would be the most stable and compatible for working with EF Core 8 and the Aumerial provider for IBM i (Db2)?

I’d like to ensure I’m using a version that maintains long-term support and minimal compatibility issues with the rest of the ABP ecosystem.

Thanks again for your support!

Hello Team,

I am working on a project using the following setup: ABP Studio Installed Version: 0.9.26 ABP CLI Version: 9.1.1 .NET Version: 9.0 Entity Framework Core Version: 9.x (default) My requirement is to connect the solution to an IBM i (AS/400) Db2 database instead of the default PostgreSQL provider. To do this, I need to use the Aumerial.Data.NTI package: https://www.nuget.org/packages/Aumerial.Data.Nti Since EF Core does not officially support IBM i, I’m considering using the Aumerial.EntityFrameworkCore provider.

I would appreciate your guidance on the following:

  1. Which version of Entity Framework Core is fully compatible with Aumerial.EntityFrameworkCore?
  2. If I use a compatible version of Entity Framework Core that works with Aumerial, will I be able to continue using ABP Framework 9.1.1 without issues in my project setup?
  3. What is the recommended approach to use IBM i Db2 in ABP projects?

Looking forward to your guidance. Rishikesh

Showing 21 to 25 of 25 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.