Skip to content

CLI produces no test project for app-nolayers, while the Studio wizard does for the same template #25961

Description

@benmassaoud

Is there an existing issue for this?

  • I have searched the existing issues

Description

abp new <name> -t app-nolayers produces a solution with no test project at all, and no flag asks for one. The ABP Studio wizard produces test projects for the same template, so the two paths do not yield the same solution.

The CLI knows how to produce test projects. It does so for the layered template and not for the single-layer one. Same command, same version, only the template changes:

Command Summary line What comes out
abp new SondeB -t app-modern -u react Test Projects: Yes five .csproj under test/
abp new Sonde -t app-nolayers-modern -u react Test Projects: No a single .csproj

The help exposes an off switch only:

-ntp, --no-tests                      Skip test project generation

A flag that says "do not generate" implies generation is the default. It is for app-modern; it is not for app-nolayers, and nothing asks for it.

This is not a limitation of the modern variant. The classic one behaves the same way:

abp new Sonde -t app-nolayers -u mvc      # "Test Projects: No", a single .csproj

Nothing recovers the missing project afterwards. abp new-package cannot produce a test project. Its eighteen documented templates run from lib.class-library to csharp.library without one, and the binary confirms it by another path:

abp new-package -n X.Zzz -t lib.test
[ERR] Package builder for lib.test is not defined!

The effect: any scripted creation, any incident reproduction, any CI pipeline starts without a test harness, and the harness then has to be written by hand. The createCommand that Studio records in the .abpsln does not recover it either: it describes a resolved state, not the command that was typed, and replayed as-is it produces a solution that is missing the test project, the mobile application and the modules.

Reproduction Steps

From two neighbouring empty folders, with output captured outside the target folder (redirecting into it makes the command fail with "The output folder is not empty"):

abp --version                             # 3.0.10 at time of measurement
abp help new | grep -i test               # a single line: -ntp, --no-tests
mkdir -p vide/a vide/b
cd vide/a && abp new Sonde  -t app-nolayers-modern -u react --dont-run-install-libs -sm -smr > ../a.txt 2>&1
cd ../b  && abp new SondeB -t app-modern           -u react --dont-run-install-libs -sm -smr > ../b.txt 2>&1
grep -i "Test Projects" ../a.txt ../b.txt   # No, then Yes
find .. -name "*.csproj" | wc -l
abp new Sonde2 -t app-nolayers -u mvc        # "Test Projects: No" as well

Expected — either the single-layer template produces a test project like the layered one does, or a flag asks for it.

ActualTest Projects: No, one .csproj, and no way to ask.

Version

3.0.10 (Volo.Abp.Studio.Cli, also the latest published at time of measurement; identical on 3.0.9)

curl -s "https://azuresearch-usnc.nuget.org/query?q=packageid:Volo.Abp.Studio.Cli"

Operation System

Windows (Default)

Solution Configuration

  • Template: app-nolayers
  • Created ABP Studio Version: 3.0.10 CLI
  • Tiered: No
  • UI Framework: react (also reproduced with mvc)
  • Database Provider: ef
  • Public Website: No

Other information

The asymmetry is what makes this look like an oversight rather than a design choice: the wizard and the CLI are two front-ends over the same template, and only one of them emits the test project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions