Skip to content

Function Archetype Test Plan

Hanxiao Liu edited this page Nov 1, 2018 · 10 revisions

Clear local cache

Delete following from maven local cache (it's in your local maven repo)

  • azure-functions-maven-plugin
  • azure-maven-plugins-pom
  • azure-maven-plugin-lib
  • azure-maven-plugins
  • azure-functions-archetype

Add following profile to your settings.xml

For release

<profiles>
    <profile>
      <id>archetype</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>archetype</id>
          <url>https://oss.sonatype.org/content/repositories/commicrosoftazure-{id}/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

For regression test

    <profile>
      <id>archetype</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>archetype</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>

Generate archetype

  1. Run mvn archetype:generate -DarchetypeGroupId=com.microsoft.azure -DarchetypeArtifactId=azure-functions-archetype -DarchetypeVersion={version} (Please use SNAPSHOT version for regression test)
  2. The user can specify the resource group
  3. Archetype should check whether artifactId and groupId follows pattern [A-Za-z0-9_-.]+

Test according to the Test Plan for Maven plugin