Skip to content

Testing new version before release

Boris Penkov edited this page May 29, 2024 · 33 revisions

CLI

Let's say that we have alpha/beta/rc tagged in the CLI - e.g. 9.0.5-beta.0.

Note: To release package follow the publishing new version topic, just release alpha/beta/rc instead of official version.

We used to follow the Getting Started with Ignite UI CLI topic and test the generated Angular projects. However, here is a more detailed list of what should be generated and what should be tested at the end of the day. The next sections cover testing Angular project. The same testing should be valid for other technologies if the release is specific for them, or when we have a major release. The common case is to test Angular project because it is used by CodeGen.

Angular

Wizard

Using the wizard (step by step prompt):

  • empty project
  • a project with all the components and scenarios
  • a project with a component or scenario with login and custom theme.
  • authentication project

Commands

Using commands from the topic Getting Started with Ignite UI CLI:

  • empty new project
  • at least adding one component and one scenario (testing all the components with the wizard above will guarantee properly generation for other components)
  • authentication project
  • when there is a major release it is good to test both free and licensed packages.

Checklist

When a project is generated you need to test the following:

  • the project is built
  • created bundles should be served on localhost and should be verified that the application is run successfully (only for major releases)
  • console errors (for a project with all the components you need to navigate through all the samples)
  • proper UI and experience for each of the samples
  • no lint errors
  • passing tests

For the above, you can use the VS Code npm scripts window in the Explorer tab and start each command them from there:

Other frameworks

For other projects like angular wrappers, react, react wrappers and web-components testing should be generating a project with all the components and again following the checklist.

Migrations & Schematics for Angular

ng update

Test the samples browser or other app and if it is possible create migrations for all the updates.

igniteui-angular - ng-add

Testing ng-add schematic for the igniteui-angular. This is our only schematic that is in the igniteui-angular project. Others are in the @igniteui/angular-schematics.

In order to test ng-add schematic you need to have a project (it may be empty), created with Anagular CLI (npm install -g @angular/cli)

ng new 

Note: Use SCSS for styling

In order to test properly ng-add schematic the igniteui-angular beta package should have reference to the alpha/beta/rc package of @igniteui/angular-schematics. In that case [email protected] have reference to the @igniteui/[email protected]. Then you can run:

If everything is successful then you can a component or a scenario, following this topic:

ng g @igniteui/angular-schematics:component --template=grid --name=newGrid

@igniteui/angular-schematics

When you have tagged a version of the CLI, then it also produces a package for the @igniteui/angular-schematics

npm i -g @igniteui/[email protected]

and create a project with the schematic.

ng new --collection="@igniteui/angular-schematics"

Then you can follow the wizard and generate a project with some scenarios and components and validate with the checklist.

Upgrading packages using our Angular Schematics or Ignite UI CLI

Use the following document to test upgrade from free to licensed package: https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/ignite-ui-licensing#upgrading-packages-using-our-angular-schematics-or-ignite-ui-cli

The commands are:

ng g @igniteui/angular-schematics:upgrade-packages

or for CLI use:

ig upgrade-packages

CodeGen

Test empty project

The command that is used in the CodeGen is the one for creating an empty project:

ng new empty-angular-project --collection="@igniteui/angular-schematics" --skip-git=true --skip-install=true --template=empty --theme=Default

If you don't have schmeatics installed, then:

npm i -g @igniteui/[email protected]

Update CodeGen schematics reference

The following will ensure that creating a project will not fail, however it cannot guarantee if the CodeGen, using the new @igniteui/angular-schematics@alpha/beta/rc will generate proper applications. In order to test that, go to CodeGen schematics project and update version of the @igniteui/angular-schematics. Here is a PR for that.

-ANGULAR_CLI_VERSION = "^12.0.0"
-IGNITEUI_SCHEMATICS_VERSION = "~12.0.800"
+ANGULAR_CLI_VERSION = "^12.1.1"
+IGNITEUI_SCHEMATICS_VERSION = "~12.1.810-beta.0"

Note: Along with an update of the @igniteui/angular-schematics in most of the cases you need to update and @angular/cli version.

In some of the cases, it is also needed to update the packages in the codegen schematics project, like it is in this PR

Note: In the above PR, the change from angular 13.0 to 13.1, brings an upgrade of typescript from 4.4 to 4.5. The latter means some significant changes in the CLI and schematics that will come in [email protected], and therefore in @igniteui/[email protected]. At the same time updating the codegen schematics project is also recommended and done in the PR above.

Test PR locally or deploy PR to CodeGen Test or DEV environments

The goal is to test all the default apps and validate them against the same checklist, shown above.

You can always test the PR locally by running CodeGen. You just need to take the app model, sent from the AppBuilder on staging. Follow this instruction to get the model data and send it to the ​/api​/Generate​/InternalApp endpoint. You need to ensure that locally you have installed the correct version of the schematics.

The alternative of local testing is to use the Test pipeline in the CodeGen project and deploy CI build to run against the PR with the schematics update. You can find the CI build here. Then you can use the App Builder staging and test all default apps, using the same checklist as the one above.

Note: If you get a schematics error, when trying to generate app from the application's json (using the Swagger UI), then it is possible to have an old schematics version. Clear the CodeGeneratorWebService solution, which will remove the empty projects:

Clean started...
1>------ Clean started: Project: CodeGeneratorWebService, Configuration: Debug Any CPU ------
1>Deleting 'C:\Work\git\CodeGen\Source\WebService\bin\Debug\net5.0\empty-angular-project'
1>Deleting 'C:\Work\git\CodeGen\Source\WebService\bin\Debug\net5.0\empty-blazor-project'

Rebuilding the solution again will produce new empty projects.

If you are about to release the CodeGen also (not only the CLI) then you can use directly the Dev release in CodeGen project and do the same. Then you can use the App Builder dev and test all default apps, using the same checklist as the one above.

If the PR is not targeted against master or vNext you will need to manually trigger CI build from the current branch.