Starts in:
2 DAYS
3 HRS
41 MIN
34 SEC
Starts in:
2 D
3 H
41 M
34 S
Open Closed

Suite v5.3.2 does not generate unit tests #3430


User avatar
1
scott7106 created

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Generated a new project Acme.BookStore using Suite Created an enum for BookType in Domain.Shared Created a new entity "Book" with the generate unit and integration tests checked

The unit tests are missing after the process completes and the following entries are in the suite log file (complete log below). 2022-07-14 10:13:45.569 -04:00 [INF] 8/10 - UnitTestCommandCommand started... 2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find DataSeedContributor so skipping data seeding step! 2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find ApplicationTestFile so skipping application test generation! 2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find RepositoryTestFile so skipping repository test generation! 2022-07-14 10:13:45.571 -04:00 [INF] 8/10 - UnitTestCommandCommand completed. | Duration: 1 ms.

2022-07-14 10:13:31.300 -04:00 [INF] Request starting HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/save-and-generate-entity application/json 1797
2022-07-14 10:13:31.302 -04:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
2022-07-14 10:13:31.305 -04:00 [INF] Route matched with {controller = "crudPageGenerator", action = "SaveAndGenerateEntity", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.NoContentResult] SaveAndGenerateEntityAsync(System.Guid, Volo.Abp.Suite.Models.EntityModel) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
2022-07-14 10:13:42.853 -04:00 [INF] 
=== ENTITY GENERATION STARTED === 
* SOLUTION: Acme.BookStore
* ENTITY:{
  "Id": "d9027e3d-00c8-4f37-87bd-a99924411ac7",
  "Name": "Book",
  "OriginalName": "Book",
  "NamePlural": "Books",
  "DatabaseTableName": "Books",
  "Namespace": "Books",
  "BaseClass": "FullAuditedEntity",
  "PrimaryKeyType": "int",
  "IsMultiTenant": true,
  "CheckConcurrency": false,
  "ShouldCreateUserInterface": true,
  "ShouldCreateBackend": true,
  "ShouldAddMigration": true,
  "ShouldUpdateDatabase": false,
  "CreateTests": true,
  "Properties": [
    {
      "Id": "05a673ec-b8b5-4681-9e62-b38c4261d095",
      "Name": "Name",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "IsNullable": false,
      "IsRequired": true,
      "MinLength": 1,
      "MaxLength": 150,
      "SortOrder": 1,
      "SortType": 1,
      "Regex": "",
      "EmailValidation": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "1ba02516-f18c-44dd-973e-0edc9c5247d6",
      "Name": "Type",
      "Type": "enum",
      "EnumType": "BookType",
      "EnumNamespace": "Acme.BookStore.Books",
      "EnumAngularImport": "shared/enums/book-type",
      "EnumFilePath": "/src/Acme.BookStore.Domain.Shared/Books/BookType.cs",
      "IsNullable": false,
      "IsRequired": false,
      "MinLength": null,
      "MaxLength": null,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "EnumValues": {
        "Undefined": null,
        "Adventure": null,
        "Biography": null,
        "Dystopia": null,
        "Fantastic": null,
        "Horror": null,
        "Science": null,
        "ScienceFiction": null,
        "Poetry": null
      },
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "4e048e30-9e46-462b-bc87-41c986bfad91",
      "Name": "PublishDate",
      "Type": "DateTime",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "IsNullable": false,
      "IsRequired": false,
      "MinLength": null,
      "MaxLength": null,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    },
    {
      "Id": "88b73a17-ec1f-480c-a080-ffa7fb0e74c2",
      "Name": "Price",
      "Type": "float",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "IsNullable": false,
      "IsRequired": false,
      "MinLength": null,
      "MaxLength": null,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "EnumValues": null,
      "IsSelected": true,
      "OrdinalIndex": 0
    }
  ],
  "NavigationProperties": [],
  "NavigationConnections": [],
  "PhysicalFileName": "Book.json"
}

2022-07-14 10:13:42.853 -04:00 [INF] 1/10 - EntityGenerateCommand started...
2022-07-14 10:13:45.072 -04:00 [INF] 1/10 - EntityGenerateCommand completed.                           | Duration: 2217 ms.
2022-07-14 10:13:45.072 -04:00 [INF] 2/10 - RepositoryCommand started...
2022-07-14 10:13:45.247 -04:00 [INF] 2/10 - RepositoryCommand completed.                               | Duration: 174 ms.
2022-07-14 10:13:45.247 -04:00 [INF] 3/10 - ManagerCommand started...
2022-07-14 10:13:45.272 -04:00 [INF] 3/10 - ManagerCommand completed.                                  | Duration: 25 ms.
2022-07-14 10:13:45.272 -04:00 [INF] 4/10 - AppServiceCommand started...
2022-07-14 10:13:45.475 -04:00 [INF] 4/10 - AppServiceCommand completed.                               | Duration: 202 ms.
2022-07-14 10:13:45.475 -04:00 [INF] 5/10 - ProxyControllerCommand started...
2022-07-14 10:13:45.500 -04:00 [INF] 5/10 - ProxyControllerCommand completed.                          | Duration: 24 ms.
2022-07-14 10:13:45.500 -04:00 [INF] 6/10 - PermissionCommand started...
2022-07-14 10:13:45.535 -04:00 [INF] 6/10 - PermissionCommand completed.                               | Duration: 34 ms.
2022-07-14 10:13:45.535 -04:00 [INF] 7/10 - ApplicationObjectMappingCommand started...
2022-07-14 10:13:45.569 -04:00 [INF] 7/10 - ApplicationObjectMappingCommand completed.                 | Duration: 34 ms.
2022-07-14 10:13:45.569 -04:00 [INF] 8/10 - UnitTestCommandCommand started...
2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find DataSeedContributor so skipping data seeding step!
2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find ApplicationTestFile so skipping application test generation!
2022-07-14 10:13:45.571 -04:00 [WRN] Cannot find RepositoryTestFile so skipping repository test generation!
2022-07-14 10:13:45.571 -04:00 [INF] 8/10 - UnitTestCommandCommand completed.                          | Duration: 1 ms.
2022-07-14 10:13:45.571 -04:00 [INF] 9/10 - AngularUiGenerateWithSchematicsCommand started...
2022-07-14 10:14:16.900 -04:00 [INF] Running the Angular Schematics command:
node run-schematics.mjs "c:/appdev/test/Acme.BookStore/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-pro Acme.BookStore "c:/appdev/test/Acme.BookStore/aspnet-core/.suite/entities/Book.json" "c:/appdev/test/Acme.BookStore/angular" 
2022-07-14 10:14:22.924 -04:00 [INF] Angular Schematics command executed successfully.
CREATE src/app/books/book/providers/book-route.provider.ts (545 bytes)
CREATE src/app/books/book/book-routing.module.ts (468 bytes)
CREATE src/app/books/book/book.module.ts (848 bytes)
CREATE src/app/books/book/components/book.component.html (12150 bytes)
CREATE src/app/books/book/components/book.component.ts (3248 bytes)
CREATE src/app/proxy/generate-proxy.json (26502 bytes)
CREATE src/app/proxy/books/book.service.ts (1646 bytes)
CREATE src/app/proxy/books/models.ts (773 bytes)
CREATE src/app/proxy/books/book-type.enum.ts (290 bytes)
CREATE src/app/proxy/books/index.ts (92 bytes)
CREATE src/app/proxy/index.ts (52 bytes)
UPDATE src/app/app-routing.module.ts (2044 bytes)
UPDATE src/app/app.module.ts (2657 bytes)

2022-07-14 10:14:22.939 -04:00 [INF] 9/10 - AngularUiGenerateWithSchematicsCommand completed.          | Duration: 37367 ms.
2022-07-14 10:14:22.939 -04:00 [INF] 10/10 - DbMigrationCommand started...
2022-07-14 10:14:22.940 -04:00 [INF] Adding new migration...
2022-07-14 10:14:22.940 -04:00 [INF] cd /d "c:\appdev\test\Acme.BookStore\aspnet-core\src\Acme.BookStore.EntityFrameworkCore" && dotnet ef migrations add Added_Book --startup-project ../Acme.BookStore.HttpApi.Host --output-dir Migrations --context BookStoreDbContext
2022-07-14 10:14:48.510 -04:00 [INF] Build started...
Build succeeded.
The Entity Framework tools version '6.0.0' is older than that of the runtime '6.0.5'. Update the tools for the latest features and bug fixes. See https://aka.ms/AAc1fbw for more information.
[10:14:44 INF] Starting Acme.BookStore.HttpApi.Host.
[10:14:46 FTL] Host terminated unexpectedly!
Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException: Exception of type 'Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException' was thrown.
   at Microsoft.Extensions.Hosting.HostFactoryResolver.HostingListener.OnNext(KeyValuePair`2 value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
   at Acme.BookStore.Program.Main(String[] args) in c:\AppDev\Test\Acme.BookStore\aspnet-core\src\Acme.BookStore.HttpApi.Host\Program.cs:line 37
Done. To undo this action, use 'ef migrations remove'

2022-07-14 10:14:48.510 -04:00 [INF] Successfully added migration.
2022-07-14 10:14:48.511 -04:00 [INF] 10/10 - DbMigrationCommand completed.                              | Duration: 25572 ms.
2022-07-14 10:14:48.511 -04:00 [INF] Entity generation completed in 66 sec.
2022-07-14 10:14:48.516 -04:00 [INF] Executing StatusCodeResult, setting HTTP status code 204
2022-07-14 10:14:48.516 -04:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite) in 77211.2944ms
2022-07-14 10:14:48.516 -04:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
2022-07-14 10:14:48.516 -04:00 [INF] Request finished HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/save-and-generate-entity application/json 1797 - 204 - - 77216.0402ms
2022-07-14 10:14:48.584 -04:00 [INF] Request starting HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/entities application/json -
2022-07-14 10:14:48.584 -04:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite)'
2022-07-14 10:14:48.584 -04:00 [INF] Route matched with {controller = "crudPageGenerator", action = "GetEntities", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[Volo.Abp.Suite.Models.EntityModel]] GetEntitiesAsync(System.Guid) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
2022-07-14 10:14:48.609 -04:00 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Volo.Abp.Suite.Models.EntityModel, Volo.Abp.Suite, Version=5.3.2.0, Culture=neutral, PublicKeyToken=null]]'.
2022-07-14 10:14:48.621 -04:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite) in 36.8849ms
2022-07-14 10:14:48.622 -04:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntitiesAsync (Volo.Abp.Suite)'
2022-07-14 10:14:48.622 -04:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/entities application/json - - 200 - application/json;+charset=utf-8 37.5436ms
2022-07-14 10:14:48.664 -04:00 [INF] Request starting HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/Book application/json -
2022-07-14 10:14:48.664 -04:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntityAsync (Volo.Abp.Suite)'
2022-07-14 10:14:48.673 -04:00 [INF] Route matched with {controller = "crudPageGenerator", action = "GetEntity", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Suite.Models.EntityModel] GetEntityAsync(System.Guid, System.String) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
2022-07-14 10:14:48.682 -04:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Suite.Models.EntityModel'.
2022-07-14 10:14:48.683 -04:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntityAsync (Volo.Abp.Suite) in 10.2872ms
2022-07-14 10:14:48.683 -04:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetEntityAsync (Volo.Abp.Suite)'
2022-07-14 10:14:48.684 -04:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/e568bef1-65ef-404f-9c2b-041dc0cbf140/Book application/json - - 200 - application/json;+charset=utf-8 19.6811ms
2022-07-14 10:14:55.618 -04:00 [INF] Executed endpoint '/notification-hub'
2022-07-14 10:14:55.618 -04:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/notification-hub?id=GYJTvTGhALK8gDD9DktNHA - - - 101 - - 357709.3731ms


1 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @scott7106,

    We are sorry for delaying the response. We are aware of this issue and will fix it in the next version.

    I've refunded your question credit.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06