Is there a way to pack the tests within a project through the command line?

I am trying to create a library of components that can be used to create a CICD pipeline using UiPath Robots, for UiPath code. My sample pipeline is as follows

  1. Pull Repository from Source Control
  2. Package source code into NuGet package
  3. Upload package to QA Orchestrator
  4. Run Test Sets
  5. Validate Test Set Results
    6a. If any failed, or timeout for execution exceeded, error out of the pipeline
    6b. If all test sets passed, deploy to Production Orchestrator

*Note that I am using the Testing tab withing Orchestrator for all of this, not the TestManager suite.

I currently have all of the steps working as I had originally intended, however, I noticed that after uploading my package that was created using the UiRobot.exe command line, my test cases are not updated. Upon further research, I realized its because when you publish test cases from Studio, itā€™s actually creating a completely new package with the ā€˜_Testsā€™ suffix and uploading that. Then, those packages are used to create a process, and the Test Sets/Cases/Executions thereafter.

I scoured the internet for any information including the docs for both the UiRobot.exe, as well as the UiPath.Studio.CommandLine.exe CLIs, but couldnā€™t find any information as to how to achieve this ā€˜Publish Test Casesā€™ functionality through the CLI. I also looked into the logs and noticed that there is a Preprocessing step, and a Compiler step that are configured using temporary files within my AppData that reflect all of the options for the Preprocessor and Compiler. This didnā€™t seem like it would lead anywhere as the only things that were different were what files to include, and didnā€™t include any flag for whether it was doing those steps for Tests or Processes.

FInally, I stumbled into an observation that if I donā€™t press OK on the popup after I publish (either Test Cases or Processes) to Orchestrator, the project directory actually contains the assembled DLLs and other files that correspond to the end-state of the compilation activities. Here, I noticed a few differences between when I chose to publish the process or publish the test cases:

  1. There is a XAML that is automatically generated called ā€œCoverageMergeHelperWorkflow.xamlā€ when publishing test cases.
  2. The project.json has several differences within it ā€“ See Diffs here CICDDemo - Diff Checker

At this point, I made the assumption that if I were to update the project.json as part of my pipeline, I could then use the UiRobot.exe CLI once again to pack and publish the Tests for my project. I started working on creating a workflow that converts the project.json from its ā€˜Processā€™ mode to its ā€˜Testsā€™ mode, but soon realized that it would be a significant effort to ensure that there are no errors in this process as I donā€™t know the scope of what would affect it.

So there are a couple of questions I have at this point:

  1. Is there an easier way to package and/or publish test cases from a project through the CLI?
  2. If not, is there any documentation you can provide that would help me figure it out myself?
  3. Is it worth it to build the Process-Tests converter? Is UiPath going to provide this functionality within the next few release cycles?

P.S: Sorry if this is incorrectly tagged or has been previously asked and answered.

Thanks,
Yash Brahmbhatt

1 Like

Hello @eyashb!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginnerā€™s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hello @eyashb. Did you manage to solve this?

Are you looking for this command ?
./uipcli package pack ā€œC:\Users\saju\Documents\UiPath\PackTestProject\project.jsonā€ -o ā€œC:\Users\saju\Documents\UiPath\PackTestProject\packageā€ -v 1.0.1 --outputType Tests

1 Like

@saju_neeliparambath this is it. many thanks!
based on this response I can say you are advanced in this topic. could you be so kind to share your best practices for CI/CD pipeline in UiPath?

UiPath has a private preview going on now for OOB CI/CD process, it may even be in GA now
We are not going to use that since our internal requirements are sophisticated.
We evaluated uipcli but its not mature to the point we can pass custom rules to it dynamically. a combination of commandline studio exe and uipcli will be used (99% certain about it)
high level of our pipeline: bitbucket mono repo ā†’ (uipcli+studio.exe for analyze/pack/publish) in bamboo
definitely all will this be done in cloud using EC2/SQS/docker.
probably will take couple of months and will update this thread on how we ended up

2 Likes

Bro how did you even find this? Teach me your magical ways.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.