mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
🚨 Add Workflow testing framework (#1814)
* Added flag to simplify output to execute command and created executeAll Also created a command that lists workflows so it can be used by other applications that wish to interact with n8n via CLI. * Added compare funcionality that helps us identify possible breaking changes * ⚡ Add JSON flag to output execution result in json format * Add execution time to execution result * Add --output flag to save JSON formated results * Fix typos * Adding usage examples and warning message * Changing command to always output JSON information * ⚡ Add concurrency to executeAll command * ✨ Add IDs filter to executeAll command * ✏️ Fix typos * Fix lint issues * Improvements to execute all * Added colors and beautified execute all command output * Improving premature termination of execute all command * Refactored output * Added detection for warnings instead of errors for a few cases * Fixed linting * Improved process finishing * Added encryption key init, removed messages from non-debug run and created sample github actions file * Updated test command to use correct encryption key * Correcting paths * Changed command name and changed concurrency to be slot based * Added the retry functionality * Improved typing and fixed executions filtering * Updated test description * Added concurrency * Added skip list and concurrency * Fixed termination behavior, removed unnecessary code and added main mode to executions * Added special edge cases handling * Added safe debug flag for non tty terminals * Removed comparison and retries for testing * Changed the way we run commands to add more debug info * Test adding concurrency * Testing with regular testing procedure without comparison * Adding compare flag * Fixing short output command * Upgraded concurrency to 16, fixed short output and covered nodes count * Fixed short output condition * Correcting short output information * Correcting the output for short output * Added a string to possible warnings list * Added example usages with more arguments * Improvements to code made by Ivan * Removed colorize output setting (always use colors), moved execution timeout to become static and removed node list from executions * Moving types to a separate file on execute batch command * Changed interfaces file extension to prevent oclif warnings * Updated workflow pdf files * ⚡ Change rule when tests run + minor formatting fixes Co-authored-by: dali <servfrdali@yahoo.fr> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
54
packages/cli/commands/Interfaces.d.ts
vendored
Normal file
54
packages/cli/commands/Interfaces.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
interface IResult {
|
||||
totalWorkflows: number;
|
||||
summary: {
|
||||
failedExecutions: number,
|
||||
successfulExecutions: number,
|
||||
warningExecutions: number,
|
||||
errors: IExecutionError[],
|
||||
warnings: IExecutionError[],
|
||||
};
|
||||
coveredNodes: {
|
||||
[nodeType: string]: number
|
||||
};
|
||||
executions: IExecutionResult[];
|
||||
}
|
||||
interface IExecutionResult {
|
||||
workflowId: string | number;
|
||||
workflowName: string;
|
||||
executionTime: number; // Given in seconds with decimals for milisseconds
|
||||
finished: boolean;
|
||||
executionStatus: ExecutionStatus;
|
||||
error?: string;
|
||||
changes?: string;
|
||||
coveredNodes: {
|
||||
[nodeType: string]: number
|
||||
};
|
||||
}
|
||||
|
||||
interface IExecutionError {
|
||||
workflowId: string | number;
|
||||
error: string;
|
||||
}
|
||||
|
||||
interface IWorkflowExecutionProgress {
|
||||
workflowId: string | number;
|
||||
status: ExecutionStatus;
|
||||
}
|
||||
|
||||
interface INodeSpecialCases {
|
||||
[nodeName: string]: INodeSpecialCase;
|
||||
}
|
||||
|
||||
interface INodeSpecialCase {
|
||||
ignoredProperties?: string[];
|
||||
capResults?: number;
|
||||
}
|
||||
|
||||
type ExecutionStatus = 'success' | 'error' | 'warning' | 'running';
|
||||
|
||||
declare module 'json-diff' {
|
||||
interface IDiffOptions {
|
||||
keysOnly?: boolean;
|
||||
}
|
||||
export function diff(obj1: unknown, obj2: unknown, diffOptions: IDiffOptions): string;
|
||||
}
|
||||
Reference in New Issue
Block a user