How to use GetDeclarationsForImport method in ts-auto-mock

Best JavaScript code snippet using ts-auto-mock

ImportResolveExtension.js

Source:ImportResolveExtension.js Github

copy

Full Screen

1"use strict";2Object.defineProperty(exports, "__esModule", { value: true });3const tslib_1 = require("tslib");4const inversify_1 = require("inversify");5const typescript_parser_1 = require("typescript-parser");6const vscode_1 = require("vscode");7const helpers_1 = require("../../common/helpers");8const quick_pick_items_1 = require("../../common/quick-pick-items");9const IoCSymbols_1 = require("../IoCSymbols");10const managers_1 = require("../managers");11const DeclarationIndexMapper_1 = require("../utilities/DeclarationIndexMapper");12const BaseExtension_1 = require("./BaseExtension");13const resolverOk = 'TSH Resolver $(check)';14const resolverSyncing = 'TSH Resolver $(sync)';15const resolverErr = 'TSH Resolver $(flame)';16let ImportResolveExtension = ImportResolveExtension_1 = class ImportResolveExtension extends BaseExtension_1.BaseExtension {17 constructor(context, logger, parser, indices) {18 super(context);19 this.logger = logger;20 this.parser = parser;21 this.indices = indices;22 this.statusBarItem = vscode_1.window.createStatusBarItem(vscode_1.StatusBarAlignment.Left, 4);23 }24 initialize() {25 this.context.subscriptions.push(this.statusBarItem);26 this.statusBarItem.text = resolverOk;27 this.statusBarItem.tooltip = 'Click to manually reindex all files';28 this.statusBarItem.command = 'typescriptHero.resolve.rebuildCache';29 this.context.subscriptions.push(this.indices.onStartIndexing(() => {30 this.statusBarItem.text = resolverSyncing;31 }));32 this.context.subscriptions.push(this.indices.onFinishIndexing(() => {33 this.statusBarItem.text = resolverOk;34 }));35 this.context.subscriptions.push(this.indices.onIndexingError(() => {36 this.statusBarItem.text = resolverErr;37 }));38 this.statusBarItem.show();39 this.commandRegistrations();40 this.logger.info('[%s] initialized', ImportResolveExtension_1.name);41 }42 dispose() {43 this.logger.info('[%s] disposed', ImportResolveExtension_1.name);44 }45 addImport() {46 return tslib_1.__awaiter(this, void 0, void 0, function* () {47 if (!vscode_1.window.activeTextEditor) {48 return;49 }50 const index = this.indices.getIndexForFile(vscode_1.window.activeTextEditor.document.uri);51 if (!index || !index.indexReady) {52 this.showCacheWarning();53 return;54 }55 try {56 const selectedItem = yield vscode_1.window.showQuickPick(index.declarationInfos.map(o => new quick_pick_items_1.ResolveQuickPickItem(o)), { placeHolder: 'Add import to document:' });57 if (selectedItem) {58 this.logger.info('[%s] add import to document', ImportResolveExtension_1.name, { specifier: selectedItem.declarationInfo.declaration.name, library: selectedItem.declarationInfo.from });59 this.addImportToDocument(selectedItem.declarationInfo);60 }61 }62 catch (e) {63 this.logger.error('[%s] import could not be added to document, error: %s', ImportResolveExtension_1.name, e, { file: vscode_1.window.activeTextEditor.document.fileName });64 vscode_1.window.showErrorMessage('The import cannot be completed, there was an error during the process.');65 }66 });67 }68 addImportUnderCursor() {69 return tslib_1.__awaiter(this, void 0, void 0, function* () {70 if (!vscode_1.window.activeTextEditor) {71 return;72 }73 const index = this.indices.getIndexForFile(vscode_1.window.activeTextEditor.document.uri);74 if (!index || !index.indexReady) {75 this.showCacheWarning();76 return;77 }78 try {79 const selectedSymbol = this.getSymbolUnderCursor();80 this.logger.debug('[%s] add import for symbol under cursor', ImportResolveExtension_1.name, { selectedSymbol });81 if (!!!selectedSymbol) {82 return;83 }84 const resolveItems = yield this.getDeclarationsForImport({85 cursorSymbol: selectedSymbol,86 documentSource: vscode_1.window.activeTextEditor.document.getText(),87 documentPath: vscode_1.window.activeTextEditor.document.fileName,88 });89 if (resolveItems.length < 1) {90 this.logger.info('[%s] the symbol was not found or is already imported', ImportResolveExtension_1.name, { selectedSymbol });91 vscode_1.window.showInformationMessage(`The symbol '${selectedSymbol}' was not found in the index or is already imported.`);92 }93 else if (resolveItems.length === 1 && resolveItems[0].declaration.name === selectedSymbol) {94 this.logger.info('[%s] add import to document', ImportResolveExtension_1.name, {95 specifier: resolveItems[0].declaration.name,96 library: resolveItems[0].from,97 });98 this.addImportToDocument(resolveItems[0]);99 }100 else {101 const selectedItem = yield vscode_1.window.showQuickPick(resolveItems.map(o => new quick_pick_items_1.ResolveQuickPickItem(o)), { placeHolder: 'Multiple declarations found:' });102 if (selectedItem) {103 this.logger.info('[%s] add import to document', ImportResolveExtension_1.name, {104 specifier: selectedItem.declarationInfo.declaration.name,105 library: selectedItem.declarationInfo.from,106 });107 this.addImportToDocument(selectedItem.declarationInfo);108 }109 }110 }111 catch (e) {112 this.logger.error('[%s] import could not be added to document, error: %s', ImportResolveExtension_1.name, e, { file: vscode_1.window.activeTextEditor.document.fileName });113 vscode_1.window.showErrorMessage('The import cannot be completed, there was an error during the process.');114 }115 });116 }117 addMissingImports() {118 return tslib_1.__awaiter(this, void 0, void 0, function* () {119 if (!vscode_1.window.activeTextEditor) {120 return;121 }122 const index = this.indices.getIndexForFile(vscode_1.window.activeTextEditor.document.uri);123 if (!index || !index.indexReady) {124 this.showCacheWarning();125 return;126 }127 try {128 this.logger.debug('[%s] add all missing imports to the document', ImportResolveExtension_1.name, { file: vscode_1.window.activeTextEditor.document.fileName });129 const missing = yield this.getMissingDeclarationsForFile({130 documentSource: vscode_1.window.activeTextEditor.document.getText(),131 documentPath: vscode_1.window.activeTextEditor.document.fileName,132 });133 if (missing && missing.length) {134 const ctrl = yield managers_1.ImportManager.create(vscode_1.window.activeTextEditor.document);135 missing.filter(o => o instanceof typescript_parser_1.DeclarationInfo).forEach(o => ctrl.addDeclarationImport(o));136 yield ctrl.commit();137 }138 }139 catch (e) {140 this.logger.error('[%s] missing imports could not be added, error: %s', ImportResolveExtension_1.name, e, { file: vscode_1.window.activeTextEditor.document.fileName });141 vscode_1.window.showErrorMessage('The operation cannot be completed, there was an error during the process.');142 }143 });144 }145 organizeImports() {146 return tslib_1.__awaiter(this, void 0, void 0, function* () {147 if (!vscode_1.window.activeTextEditor) {148 return false;149 }150 try {151 this.logger.debug('[%s] organize the imports in the document', ImportResolveExtension_1.name, { file: vscode_1.window.activeTextEditor.document.fileName });152 const ctrl = yield managers_1.ImportManager.create(vscode_1.window.activeTextEditor.document);153 return yield ctrl.organizeImports().commit();154 }155 catch (e) {156 this.logger.error('[%s] imports could not be organized, error: %s', ImportResolveExtension_1.name, e, { file: vscode_1.window.activeTextEditor.document.fileName });157 return false;158 }159 });160 }161 addImportToDocument(declaration) {162 return tslib_1.__awaiter(this, void 0, void 0, function* () {163 if (!vscode_1.window.activeTextEditor) {164 return false;165 }166 const ctrl = yield managers_1.ImportManager.create(vscode_1.window.activeTextEditor.document);167 return yield ctrl.addDeclarationImport(declaration).commit();168 });169 }170 getSymbolUnderCursor() {171 const editor = vscode_1.window.activeTextEditor;172 if (!editor) {173 return '';174 }175 const selection = editor.selection;176 const word = editor.document.getWordRangeAtPosition(selection.active);177 return word && !word.isEmpty ? editor.document.getText(word) : '';178 }179 showCacheWarning() {180 this.logger.warn('[%s] index was not ready or not index for this file found', ImportResolveExtension_1.name);181 vscode_1.window.showWarningMessage('Please wait a few seconds longer until the symbol cache has been build.');182 }183 getDeclarationsForImport({ cursorSymbol, documentSource, documentPath }) {184 return tslib_1.__awaiter(this, void 0, void 0, function* () {185 if (!vscode_1.window.activeTextEditor) {186 return [];187 }188 const index = this.indices.getIndexForFile(vscode_1.window.activeTextEditor.document.uri);189 const rootFolder = vscode_1.workspace.getWorkspaceFolder(vscode_1.window.activeTextEditor.document.uri);190 if (!index || !index.indexReady || !rootFolder) {191 return [];192 }193 this.logger.debug('[%s] calculate possible imports for document', ImportResolveExtension_1.name, { cursorSymbol, file: documentPath });194 const parsedSource = yield this.parser.parseSource(documentSource);195 const activeDocumentDeclarations = parsedSource.declarations.map(o => o.name);196 const declarations = helpers_1.getDeclarationsFilteredByImports(index.declarationInfos, documentPath, parsedSource.imports, rootFolder.uri.fsPath).filter(o => o.declaration.name.startsWith(cursorSymbol));197 return [198 ...declarations.filter(o => o.from.startsWith('/')),199 ...declarations.filter(o => !o.from.startsWith('/')),200 ].filter(o => activeDocumentDeclarations.indexOf(o.declaration.name) === -1);201 });202 }203 getMissingDeclarationsForFile({ documentSource, documentPath }) {204 return tslib_1.__awaiter(this, void 0, void 0, function* () {205 if (!vscode_1.window.activeTextEditor) {206 return [];207 }208 const index = this.indices.getIndexForFile(vscode_1.window.activeTextEditor.document.uri);209 const rootFolder = vscode_1.workspace.getWorkspaceFolder(vscode_1.window.activeTextEditor.document.uri);210 if (!index || !index.indexReady || !rootFolder) {211 return [];212 }213 this.logger.debug('[%s] calculate missing imports for document', ImportResolveExtension_1.name, { file: documentPath });214 const parsedDocument = yield this.parser.parseSource(documentSource);215 const missingDeclarations = [];216 const declarations = helpers_1.getDeclarationsFilteredByImports(index.declarationInfos, documentPath, parsedDocument.imports, rootFolder.uri.fsPath);217 for (const usage of parsedDocument.nonLocalUsages) {218 const foundDeclarations = declarations.filter(o => o.declaration.name === usage);219 if (foundDeclarations.length <= 0) {220 continue;221 }222 else if (foundDeclarations.length === 1) {223 missingDeclarations.push(foundDeclarations[0]);224 }225 else {226 }227 }228 return missingDeclarations;229 });230 }231 commandRegistrations() {232 this.context.subscriptions.push(vscode_1.commands.registerTextEditorCommand('typescriptHero.resolve.addImport', () => this.addImport()));233 this.context.subscriptions.push(vscode_1.commands.registerTextEditorCommand('typescriptHero.resolve.addImportUnderCursor', () => this.addImportUnderCursor()));234 this.context.subscriptions.push(vscode_1.commands.registerTextEditorCommand('typescriptHero.resolve.addMissingImports', () => this.addMissingImports()));235 this.context.subscriptions.push(vscode_1.commands.registerTextEditorCommand('typescriptHero.resolve.organizeImports', () => this.organizeImports()));236 this.context.subscriptions.push(vscode_1.commands.registerCommand('typescriptHero.resolve.rebuildCache', () => this.indices.rebuildAll()));237 }238};239ImportResolveExtension = ImportResolveExtension_1 = tslib_1.__decorate([240 inversify_1.injectable(),241 tslib_1.__param(0, inversify_1.inject(IoCSymbols_1.iocSymbols.extensionContext)),242 tslib_1.__param(1, inversify_1.inject(IoCSymbols_1.iocSymbols.logger)),243 tslib_1.__param(2, inversify_1.inject(IoCSymbols_1.iocSymbols.typescriptParser)),244 tslib_1.__param(3, inversify_1.inject(IoCSymbols_1.iocSymbols.declarationIndexMapper)),245 tslib_1.__metadata("design:paramtypes", [Object, Object, typescript_parser_1.TypescriptParser,246 DeclarationIndexMapper_1.DeclarationIndexMapper])247], ImportResolveExtension);248exports.ImportResolveExtension = ImportResolveExtension;...

Full Screen

Full Screen

helper.ts

Source:helper.ts Github

copy

Full Screen

...60 }61 export function GetDeclarationForImport(62 node: ImportDeclaration63 ): ts.Declaration {64 const declarations: ts.Declaration[] = GetDeclarationsForImport(node);65 return GetFirstValidDeclaration(declarations);66 }67 export function GetConcreteDeclarationForImport(68 node: ImportDeclaration69 ): ts.Declaration {70 const declarations: ts.Declaration[] = GetDeclarationsForImport(node);71 return declarations[0];72 }73 export function GetParameterOfNode(74 node: ts.EntityName75 ): ts.NodeArray<ts.TypeParameterDeclaration> {76 const declaration: ts.Declaration = GetDeclarationFromNode(node);77 const { typeParameters = createNodeArray([]) }: Declaration =78 declaration as Declaration;79 return typeParameters;80 }81 export function GetTypeParameterOwnerMock(82 declaration: ts.Declaration83 ): ts.Declaration | undefined {84 const typeDeclaration: ts.Declaration | undefined =85 core.ts.getTypeParameterOwner(declaration);86 // THIS IS TO FIX A MISSING IMPLEMENTATION IN TYPESCRIPT https://github.com/microsoft/TypeScript/blob/ba5e86f1406f39e89d56d4b32fd6ff8de09a0bf3/src/compiler/utilities.ts#L513887 if (typeDeclaration && (typeDeclaration as Declaration).typeParameters) {88 return typeDeclaration;89 }90 for (91 let current: ts.Node = declaration;92 current;93 current = current.parent94 ) {95 if (current.kind === core.ts.SyntaxKind.TypeAliasDeclaration) {96 return current as ts.Declaration;97 }98 }99 }100 export function GetStringPropertyName(propertyName: ts.PropertyName): string {101 if (!core.ts.isComputedPropertyName(propertyName)) {102 return propertyName.text;103 }104 const symbol: ts.Symbol | undefined =105 core.typeChecker.getSymbolAtLocation(propertyName);106 if (!symbol) {107 throw new Error(108 `The type checker failed to look up symbol for property: ${propertyName.getText()}.`109 );110 }111 return symbol.escapedName.toString();112 }113 export function GetAliasedSymbolSafe(alias: ts.Symbol): ts.Symbol {114 return isAlias(alias) ? core.typeChecker.getAliasedSymbol(alias) : alias;115 }116 export function getSignatureOfCallExpression(117 node: ts.CallExpression118 ): ts.Signature | undefined {119 return core.typeChecker.getResolvedSignature(node);120 }121 export function hasTypeArguments(node: ts.CallExpression): boolean {122 return (123 typeof node.typeArguments !== 'undefined' && !!node.typeArguments.length124 );125 }126 function GetFirstValidDeclaration(127 declarations: ts.Declaration[]128 ): ts.Declaration {129 return (130 declarations.find(131 (declaration: ts.Declaration) =>132 !core.ts.isVariableDeclaration(declaration) &&133 !core.ts.isFunctionDeclaration(declaration) &&134 !core.ts.isModuleDeclaration(declaration)135 ) || declarations[0]136 );137 }138 function isAlias(symbol: ts.Symbol): boolean {139 return !!(140 symbol.flags & core.ts.SymbolFlags.Alias ||141 symbol.flags & core.ts.SymbolFlags.AliasExcludes142 );143 }144 function isImportExportDeclaration(145 declaration: ts.Declaration146 ): declaration is ImportDeclaration {147 return (148 core.ts.isImportEqualsDeclaration(declaration) ||149 core.ts.isImportOrExportSpecifier(declaration) ||150 core.ts.isImportClause(declaration)151 );152 }153 function GetDeclarationsForImport(node: ImportDeclaration): ts.Declaration[] {154 const typeChecker: ts.TypeChecker = core.typeChecker;155 const symbol: ts.Symbol | undefined =156 node.name && typeChecker.getSymbolAtLocation(node.name);157 const originalSymbol: ts.Symbol | undefined =158 symbol && typeChecker.getAliasedSymbol(symbol);159 return originalSymbol?.declarations ?? [];160 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock/extension';2const declarations = GetDeclarationsForImport('test2');3import { GetDeclarationsForImport } from 'ts-auto-mock/extension';4const declarations = GetDeclarationsForImport('test3');5import { GetDeclarationsForImport } from 'ts-auto-mock/extension';6const declarations = GetDeclarationsForImport('test4');7import { GetDeclarationsForImport } from 'ts-auto-mock/extension';8const declarations = GetDeclarationsForImport('test5');9import { GetDeclarationsForImport } from 'ts-auto-mock/extension';10const declarations = GetDeclarationsForImport('test6');11import { GetDeclarationsForImport } from 'ts-auto-mock/extension';12const declarations = GetDeclarationsForImport('test7');13import { GetDeclarationsForImport } from 'ts-auto-mock/extension';14const declarations = GetDeclarationsForImport('test8');15import { GetDeclarationsForImport } from 'ts-auto-mock/extension';16const declarations = GetDeclarationsForImport('test9');17import { GetDeclarationsForImport } from 'ts-auto-mock/extension';18const declarations = GetDeclarationsForImport('test10');19import { GetDeclarationsForImport } from 'ts-auto-mock/extension';20const declarations = GetDeclarationsForImport('test11');

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock';2import { GetMockFor } from 'ts-auto-mock';3import { GetMockForInterface } from 'ts-auto-mock';4import { GetMockForClass } from 'ts-auto-mock';5import { GetMockForAbstractClass } from 'ts-auto-mock';6import { GetDeclarationsForImport } from 'ts-auto-mock';7import { GetMockFor } from 'ts-auto-mock';8import { GetMockForInterface } from 'ts-auto-mock';9import { GetMockForClass } from 'ts-auto-mock';10import { GetMockForAbstractClass } from 'ts-auto-mock';11import { GetDeclarationsForImport } from 'ts-auto-mock';12import { GetMockFor } from 'ts-auto-mock';13import { GetMockForInterface } from 'ts-auto-mock';14import { GetMockForClass } from 'ts-auto-mock';15import { GetMockForAbstractClass } from 'ts-auto-mock';16import { GetDeclarationsForImport } from 'ts-auto-mock';17import { GetMockFor } from 'ts-auto-mock';18import { GetMockForInterface } from 'ts-auto-mock';19import { GetMockForClass } from 'ts-auto-mock';20import { GetMockForAbstractClass } from 'ts-auto-mock';21import { GetDeclarationsForImport } from 'ts-auto-mock';22import { GetMockFor } from 'ts-auto-mock';23import { GetMockForInterface } from 'ts-auto-mock';24import { GetMockForClass } from 'ts-auto-mock';25import { GetMockForAbstractClass } from 'ts-auto-mock';26import { GetDeclarationsForImport } from 'ts-auto-mock';27import { GetMockFor } from 'ts-auto-mock';

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock/extension';2import { MyInterface } from './test2';3const declarations = GetDeclarationsForImport('./test2', 'MyInterface');4import { GetDeclarationsForImport } from 'ts-auto-mock/extension';5import { MyInterface } from './test2';6const declarations = GetDeclarationsForImport('./test2', 'MyInterface');7import { GenerateMock } from 'ts-auto-mock/extension';8import { MyInterface } from './test2';9const mock: MyInterface = GenerateMock<MyInterface>();10import { GenerateMock } from 'ts-auto-mock/extension';11import { MyInterface } from './test2';12const mock: MyInterface = GenerateMock<MyInterface>();13import { GenerateMockFromInterface } from 'ts-auto-mock/extension';14import { MyInterface } from './test2';15const mock: MyInterface = GenerateMockFromInterface<MyInterface>();16import { GenerateMockFromInterface } from 'ts-auto-mock/extension';17import { MyInterface } from './test2';18const mock: MyInterface = GenerateMockFromInterface<MyInterface>();

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock/extension';2import { Mock } from 'ts-auto-mock';3const declarations = GetDeclarationsForImport('./test2');4const mock = Mock(declarations[0]);5console.log(mock);6export interface Test2 {7 str: string;8}9import { GetDeclarationsForImport } from 'ts-auto-mock/extension';10import { Mock } from 'ts-auto-mock';11const declarations = GetDeclarationsForImport('./test2');12const mock = Mock(declarations[0]);13console.log(mock);14export interface Test2 {15 str: string;16}17import { GetDeclarationsForImport } from 'ts-auto-mock/extension';18import { Mock } from 'ts-auto-mock';19const declarations = GetDeclarationsForImport('./test2');20const mock = Mock(declarations[0]);21console.log(mock);22export interface Test2 {23 str: string;24}25import { GetDeclarationsForImport } from 'ts-auto-mock/extension';26import { Mock } from 'ts-auto-mock';27const declarations = GetDeclarationsForImport('./test2');28const mock = Mock(declarations[0]);29console.log(mock);30export interface Test2 {31 str: string;32}33import { GetDeclarationsForImport } from 'ts-auto-mock/extension';34import { Mock } from 'ts-auto-mock';35const declarations = GetDeclarationsForImport('./test2');36const mock = Mock(declarations[0]);37console.log(mock);38export interface Test2 {39 str: string;40}

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock';2import { IMyInterface } from './test2';3const declarations = GetDeclarationsForImport('./test2', 'IMyInterface');4export interface IMyInterface {5 myProp: string;6}7export interface IMyInterface {8 myProp: string;9}10import { CreateMock } from 'ts-auto-mock';11const mock = CreateMock<IMyInterface>();12{13}14import { CreateMockForFile } from 'ts-auto-mock';15const mock = CreateMockForFile<IMyInterface>('./test2', 'IMyInterface');16{17}18import { CreateMockForFile } from 'ts-auto-mock';19const mock = CreateMockForFile<IMyInterface>('./test2', 'IMyInterface');20{21}22import { CreateMockForFile } from 'ts-auto-mock';23const mock = CreateMockForFile<IMyInterface>('./test2', 'IMyInterface');24{25}26import { CreateMockForFile } from 'ts-auto-m

Full Screen

Using AI Code Generation

copy

Full Screen

1const { GetDeclarationsForImport } = require("ts-auto-mock");2const declarations = GetDeclarationsForImport(3);4console.log(declarations);5const { GetDeclarationsForImport } = require("ts-auto-mock");6const declarations = GetDeclarationsForImport(7);8console.log(declarations);9const { GetDeclarationsForImport } = require("ts-auto-mock");10const declarations = GetDeclarationsForImport(11);12console.log(declarations);13const { GetDeclarationsForImport } = require("ts-auto-mock");14const declarations = GetDeclarationsForImport(15);16console.log(declarations);

Full Screen

Using AI Code Generation

copy

Full Screen

1import { GetDeclarationsForImport } from 'ts-auto-mock';2import { module1 } from 'module1';3const declarations = GetDeclarationsForImport(module1);4type MockModule1 = typeof declarations;5const mockModule1: MockModule1 = {} as MockModule1;6const mockModule1 = GetMockForImport<typeof module1>(module1);7const result = mockModule1.fn1();8export const module1 = {9 fn1: () => 'result'10};11import { mockModule1 } from 'test1';12describe('module1', () => {13 it('should return result', () => {14 expect(mockModule1.fn1()).toBe('result');15 });16});17import { GetMockForImport } from 'ts-auto-mock';18import { GetMockForImport } from 'ts-auto-mock';19import { module1 } from 'module1';20const mockModule1 = GetMockForImport<typeof module1>(module1);21const result = mockModule1.fn1();22export const module1 = {23 fn1: () => 'result'24};25import { mockModule1 } from 'test1';26describe('module1', () => {27 it('should return result', () => {28 expect(mockModule1.fn1()).toBe('result');29 });30});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run ts-auto-mock automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful