UiPath Documentation
studio
2023.4
false
Guia do usuário do Studio
Importante :
A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

Modelos de casos de teste

Use test case templates as base models for your test cases. For example, you can create a template with data variations to be reused on different tests. You can create test case templates for Test Automation projects, including other file types such as Global Exception Handler. For other projects (e.g., Process), you can create workflow templates.

Condições

  • Os modelos são específicos do tipo de projeto e o idioma usado para criá-lo.

  • Os modelos não podem ser convertidos em fluxos de trabalho, compilados ou publicados.

  • You can make use of reusable content by creating a library with test case templates. Test data variation is not exported to the library alongside the test case template.

    Importante:

    Os recursos referenciados no modelo não serão copiados localmente para o projeto em que você está tentando importar a biblioteca.O modelo não deve conter referências a outros ativos, como fluxos de trabalho dentro da biblioteca.

Fontes de modelo

When you add a new file, you can choose a template on which to base it. The templates that you can choose from vary depending on the type of file you are adding (workflow or test case) and on whether you have previously added templates to your project Templates folder.

Modelos integrados

Caso de Teste Vazio

Choose Empty Test Case when you create a test case if you want to add a Placeholder activity that you want to invoke at a later stage.

Caso de Teste de BDD

BDD stands for Behavioural-Driven Development. Choose BDD Test Case when you create a test case to structure your test around Given-When-Then containers.

Modelos de arquivos locais

The local templates are created in the Templates folder of the project when you extract a file as template and when you add a template to the Templates folder. Local file templates are available only inside the project where you create, or extract them.

You can create local templates of three types: execution template, workflow template, and test case template. When you extract a file as a template, the template type is applied automatically based on the type of file you extract (workflow or test case). When you manually add a template to the Templates folder, you select the type of template to create.

Modelos de arquivos de pacotes

Teste com tempo limite

The Test With Timeout template is available only with the Testing activity package, version 22.10 or higher. Choose Test With Timeout when you create a test case if you want to use a timeout or to take screenshots when a verification fails.

O modelo é configurado para lançar uma exceção baseada no tempo, fazendo uma captura de tela da falha que ocorreu em seu fluxo de trabalho.

Observação:
  • Se você definir a variável Booleana takeScreenshotOnException como false, certifique-se de modificar a propriedade Timeout Message da atividade TimeoutScope.
  • Você pode modificar o tempo limite na variável duration. O padrão é definido como cinco (5) minutos.
  • Você pode manter capturas de tela em sua máquina definindo Configurações do projeto de teste.

Adicionando um modelo de arquivo local

You can use the contextual menu in the Project panel to manually add execution, and test case templates based on other templates to your project. After you add a template, you can edit it in the Designer, and then use it as a starting point for creating other files.

  • To add a test case template, right-click the Templates folder, and then select Add > Test Case Template. Follow the test case creation process to configure the template.

  • Para adicionar um modelo de execução, clique com o botão direito do mouse na pasta Modelos e selecione Adicionar > Modelo de Execução.

Extrair arquivo como modelo

  1. Abra seu fluxo de trabalho no Studio.

  2. No painel Projeto, clique com o botão direito do mouse em um caso de teste e selecione Extrair como Modelo.

O seu caso de teste agora está armazenado em Projeto > Modelos. É possível copiar e colar ou movê-lo de volta para sua pasta de testes.

Observação:
  • É possível criar modelos diretamente a partir da pasta Modelos para seus casos de teste e fluxos de trabalho.
  • You can use the contextual menu within the Templates folder to perform various actions, such as comparing files.

Modelos de caso de teste em bibliotecas

You can create test case templates in libraries the same way you create them in processes. After you publish the library, the templates marked as public are available as package file templates in projects where the library is installed.

Criando um caso de teste de um modelo

  1. Crie um projeto de Testes.

  2. Construa qualquer caso de teste que desejar e use como modelo.

  3. When you finish building the test case, right-click it, and select Extract as Template.

    Name the template, choose the Templates folder as the location to store it in, and select Create. For this example, the name of the template is MyFirstTestCaseTemplate.

  4. Go to the Design tab, in the File group, select New > Test Case. The New Test Case window is displayed.

  5. Give it an appropriate name, and select the template that you previously created from the Template dropdown list. For this example, choose MyFirstTestCaseTemplate.

Removendo um modelo

To remove a template, expand the Templates folder in the Project panel, right-click the template, and then select Delete.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades