How to use sortSuperTypesLast method of org.mockito.internal.util.reflection.SuperTypesLastSorter class

Best Mockito code snippet using org.mockito.internal.util.reflection.SuperTypesLastSorter.sortSuperTypesLast

Source:PropertyAndSetterInjection.java Github

copy

Full Screen

...5package org.mockito.internal.configuration.injection;6import static org.mockito.internal.exceptions.Reporter.cannotInitializeForInjectMocksAnnotation;7import static org.mockito.internal.exceptions.Reporter.fieldInitialisationThrewException;8import static org.mockito.internal.util.collections.Sets.newMockSafeHashSet;9import static org.mockito.internal.util.reflection.SuperTypesLastSorter.sortSuperTypesLast;10import java.lang.reflect.Field;11import java.lang.reflect.InvocationTargetException;12import java.lang.reflect.Modifier;13import java.util.Arrays;14import java.util.Iterator;15import java.util.List;16import java.util.Set;17import org.mockito.exceptions.base.MockitoException;18import org.mockito.internal.configuration.injection.filter.MockCandidateFilter;19import org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter;20import org.mockito.internal.configuration.injection.filter.TerminalMockCandidateFilter;21import org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter;22import org.mockito.internal.util.collections.ListUtil;23import org.mockito.internal.util.reflection.FieldInitializationReport;24import org.mockito.internal.util.reflection.FieldInitializer;25import org.mockito.internal.util.reflection.SuperTypesLastSorter;26/**27 * Inject mocks using first setters then fields, if no setters available.28 *29 * <p>30 * <u>Algorithm :<br></u>31 * for each field annotated by @InjectMocks32 * <ul>33 * <li>initialize field annotated by @InjectMocks34 * <li>for each fields of a class in @InjectMocks type hierarchy35 * <ul>36 * <li>make a copy of mock candidates37 * <li>order fields from sub-type to super-type, then by field name38 * <li>for the list of fields in a class try two passes of :39 * <ul>40 * <li>find mock candidate by type41 * <li>if more than <b>*one*</b> candidate find mock candidate on name42 * <li>if one mock candidate then43 * <ul>44 * <li>set mock by property setter if possible45 * <li>else set mock by field injection46 * </ul>47 * <li>remove mock from mocks copy (mocks are just injected once in a class)48 * <li>remove injected field from list of class fields49 * </ul>50 * <li>else don't fail, user will then provide dependencies51 * </ul>52 * </ul>53 * </p>54 *55 * <p>56 * <u>Note:</u> If the field needing injection is not initialized, the strategy tries57 * to create one using a no-arg constructor of the field type.58 * </p>59 */60public class PropertyAndSetterInjection extends MockInjectionStrategy {61 private final MockCandidateFilter mockCandidateFilter =62 new TypeBasedCandidateFilter(63 new NameBasedCandidateFilter(64 new TerminalMockCandidateFilter()));65 private final ListUtil.Filter<Field> notFinalOrStatic = new ListUtil.Filter<Field>() {66 public boolean isOut(Field object) {67 return Modifier.isFinal(object.getModifiers()) || Modifier.isStatic(object.getModifiers());68 }69 };70 public boolean processInjection(Field injectMocksField, Object injectMocksFieldOwner, Set<Object> mockCandidates) {71 FieldInitializationReport report = initializeInjectMocksField(injectMocksField, injectMocksFieldOwner);72 // for each field in the class hierarchy73 boolean injectionOccurred = false;74 Class<?> fieldClass = report.fieldClass();75 Object fieldInstanceNeedingInjection = report.fieldInstance();76 while (fieldClass != Object.class) {77 injectionOccurred |= injectMockCandidates(fieldClass, fieldInstanceNeedingInjection, newMockSafeHashSet(mockCandidates));78 fieldClass = fieldClass.getSuperclass();79 }80 return injectionOccurred;81 }82 private FieldInitializationReport initializeInjectMocksField(Field field, Object fieldOwner) {83 try {84 return new FieldInitializer(fieldOwner, field).initialize();85 } catch (MockitoException e) {86 if(e.getCause() instanceof InvocationTargetException) {87 Throwable realCause = e.getCause().getCause();88 throw fieldInitialisationThrewException(field, realCause);89 }90 throw cannotInitializeForInjectMocksAnnotation(field.getName(), e);91 }92 }93 private boolean injectMockCandidates(Class<?> awaitingInjectionClazz, Object injectee, Set<Object> mocks) {94 boolean injectionOccurred;95 List<Field> orderedCandidateInjecteeFields = orderedInstanceFieldsFrom(awaitingInjectionClazz);96 // pass 197 injectionOccurred = injectMockCandidatesOnFields(mocks, injectee, false, orderedCandidateInjecteeFields);98 // pass 299 injectionOccurred |= injectMockCandidatesOnFields(mocks, injectee, injectionOccurred, orderedCandidateInjecteeFields);100 return injectionOccurred;101 }102 private boolean injectMockCandidatesOnFields(Set<Object> mocks,103 Object injectee,104 boolean injectionOccurred,105 List<Field> orderedCandidateInjecteeFields) {106 for (Iterator<Field> it = orderedCandidateInjecteeFields.iterator(); it.hasNext(); ) {107 Field candidateField = it.next();108 Object injected = mockCandidateFilter.filterCandidate(mocks, candidateField, orderedCandidateInjecteeFields, injectee)109 .thenInject();110 if (injected != null) {111 injectionOccurred |= true;112 mocks.remove(injected);113 it.remove();114 }115 }116 return injectionOccurred;117 }118 private List<Field> orderedInstanceFieldsFrom(Class<?> awaitingInjectionClazz) {119 List<Field> declaredFields = Arrays.asList(awaitingInjectionClazz.getDeclaredFields());120 declaredFields = ListUtil.filter(declaredFields, notFinalOrStatic);121 return sortSuperTypesLast(declaredFields);122 }123}...

Full Screen

Full Screen

Source:FcboxPropertyAndSetterInjection.java Github

copy

Full Screen

...18import java.util.Set;19import static org.mockito.internal.exceptions.Reporter.cannotInitializeForInjectMocksAnnotation;20import static org.mockito.internal.exceptions.Reporter.fieldInitialisationThrewException;21import static org.mockito.internal.util.collections.Sets.newMockSafeHashSet;22import static org.mockito.internal.util.reflection.SuperTypesLastSorter.sortSuperTypesLast;23/**24 * @Author: huangyin25 * @Date: 2020/12/11 11:0026 */27public class FcboxPropertyAndSetterInjection extends MockInjectionStrategy {28 private final MockCandidateFilter mockCandidateFilter =29 new TypeBasedCandidateFilter(30 new NameBasedCandidateFilter(31 new TerminalMockCandidateFilter()));32 private final ListUtil.Filter<Field> notFinalOrStatic = object -> Modifier.isFinal(object.getModifiers()) || Modifier.isStatic(object.getModifiers());33 @Override34 public boolean processInjection(Field injectMocksField, Object injectMocksFieldOwner, Set<Object> mockCandidates) {35 FieldInitializationReport report = initializeInjectMocksField(injectMocksField, injectMocksFieldOwner);36 // for each field in the class hierarchy37 boolean injectionOccurred = false;38 Class<?> fieldClass = report.fieldClass();39 Object fieldInstanceNeedingInjection = report.fieldInstance();40 // TODO: 如果是代理对象,替换成真实对象 chnage to targetInstance41 Object originalFieldInstance;42 try {43 originalFieldInstance = ProxyUtils.getTarget(fieldInstanceNeedingInjection);44 } catch (Exception e) {45 e.printStackTrace();46 originalFieldInstance = fieldInstanceNeedingInjection;47 }48 while (fieldClass != Object.class) {49 injectionOccurred |= injectMockCandidates(fieldClass, originalFieldInstance, newMockSafeHashSet(mockCandidates));50 fieldClass = fieldClass.getSuperclass();51 }52 return injectionOccurred;53 }54 private FieldInitializationReport initializeInjectMocksField(Field field, Object fieldOwner) {55 try {56 return new FieldInitializer(fieldOwner, field).initialize();57 } catch (MockitoException e) {58 if (e.getCause() instanceof InvocationTargetException) {59 Throwable realCause = e.getCause().getCause();60 throw fieldInitialisationThrewException(field, realCause);61 }62 throw cannotInitializeForInjectMocksAnnotation(field.getName(), e.getMessage());63 }64 }65 private boolean injectMockCandidates(Class<?> awaitingInjectionClazz, Object injectee, Set<Object> mocks) {66 boolean injectionOccurred;67 List<Field> orderedCandidateInjecteeFields = orderedInstanceFieldsFrom(awaitingInjectionClazz);68 // pass 169 injectionOccurred = injectMockCandidatesOnFields(mocks, injectee, false, orderedCandidateInjecteeFields);70 // pass 271 injectionOccurred |= injectMockCandidatesOnFields(mocks, injectee, injectionOccurred, orderedCandidateInjecteeFields);72 return injectionOccurred;73 }74 private boolean injectMockCandidatesOnFields(Set<Object> mocks,75 Object injectee,76 boolean injectionOccurred,77 List<Field> orderedCandidateInjecteeFields) {78 for (Iterator<Field> it = orderedCandidateInjecteeFields.iterator(); it.hasNext(); ) {79 Field candidateField = it.next();80 Object injected = mockCandidateFilter.filterCandidate(mocks, candidateField, orderedCandidateInjecteeFields, injectee)81 .thenInject();82 if (injected != null) {83 injectionOccurred |= true;84 mocks.remove(injected);85 it.remove();86 }87 }88 return injectionOccurred;89 }90 private List<Field> orderedInstanceFieldsFrom(Class<?> awaitingInjectionClazz) {91 List<Field> declaredFields = Arrays.asList(awaitingInjectionClazz.getDeclaredFields());92 declaredFields = ListUtil.filter(declaredFields, notFinalOrStatic);93 return sortSuperTypesLast(declaredFields);94 }95}...

Full Screen

Full Screen

Source:SuperTypesLastSorterTest.java Github

copy

Full Screen

...6import org.junit.Test;7import java.lang.reflect.Field;8import java.util.*;9import static org.assertj.core.api.Assertions.assertThat;10import static org.mockito.internal.util.reflection.SuperTypesLastSorter.sortSuperTypesLast;11@SuppressWarnings("unused")12public class SuperTypesLastSorterTest {13 /**14 * A Comparator that behaves like the old one, so the existing tests15 * continue to work.16 */17 private static Comparator<Field> cmp = new Comparator<Field>() {18 public int compare(Field o1, Field o2) {19 if (o1.equals(o2)) {20 return 0;21 }22 List<Field> l = sortSuperTypesLast(Arrays.asList(o1, o2));23 if (l.get(0) == o1) {24 return -1;25 } else {26 return 1;27 }28 }29 };30 private Object objectA;31 private Object objectB;32 private Number numberA;33 private Number numberB;34 private Integer integerA;35 private Integer integerB;36 private Iterable<?> iterableA;37 private Number xNumber;38 private Iterable<?> yIterable;39 private Integer zInteger;40 @Test41 public void when_same_type_the_order_is_based_on_field_name() throws Exception {42 assertThat(cmp.compare(field("objectA"), field("objectB"))).isEqualTo(-1);43 assertThat(cmp.compare(field("objectB"), field("objectA"))).isEqualTo(1);44 assertThat(cmp.compare(field("objectB"), field("objectB"))).isEqualTo(0);45 }46 @Test47 public void when_type_is_different_the_supertype_comes_last() throws Exception {48 assertThat(cmp.compare(field("numberA"), field("objectB"))).isEqualTo(-1);49 assertThat(cmp.compare(field("objectB"), field("numberA"))).isEqualTo(1);50 }51 @Test52 public void using_Collections_dot_sort() throws Exception {53 List<Field> unsortedFields = Arrays.asList(54 field("objectB"),55 field("integerB"),56 field("numberA"),57 field("numberB"),58 field("objectA"),59 field("integerA")60 );61 List<Field> sortedFields = sortSuperTypesLast(unsortedFields);62 assertThat(sortedFields).containsSequence(63 field("integerA"),64 field("integerB"),65 field("numberA"),66 field("numberB"),67 field("objectA"),68 field("objectB")69 );70 }71 @Test72 public void issue_352_order_was_different_between_JDK6_and_JDK7() throws Exception {73 List<Field> unsortedFields = Arrays.asList(74 field("objectB"),75 field("objectA")76 );77 Collections.sort(unsortedFields, cmp);78 assertThat(unsortedFields).containsSequence(79 field("objectA"),80 field("objectB")81 );82 }83 @Test84 public void fields_sort_consistently_when_interfaces_are_included() throws NoSuchFieldException {85 assertSortConsistently(field("iterableA"), field("numberA"), field("integerA"));86 }87 @Test88 public void fields_sort_consistently_when_names_and_type_indicate_different_order() throws NoSuchFieldException {89 assertSortConsistently(field("xNumber"), field("yIterable"), field("zInteger"));90 }91 /**92 * Assert that these fields sort in the same order no matter which order93 * they start in.94 */95 private static void assertSortConsistently(Field a, Field b, Field c) {96 Field[][] initialOrderings = {97 {a, b, c},98 {a, c, b},99 {b, a, c},100 {b, c, a},101 {c, a, b},102 {c, b, a}103 };104 Set<List<Field>> results = new HashSet<List<Field>>();105 for (Field[] o : initialOrderings) {106 results.add(sortSuperTypesLast(Arrays.asList(o)));107 }108 assertThat(results).hasSize(1);109 }110 private Field field(String field) throws NoSuchFieldException {111 return getClass().getDeclaredField(field);112 }113}...

Full Screen

Full Screen

Source:SuperTypesLastSorter.java Github

copy

Full Screen

...19 /**20 * Return a new collection with the fields sorted first by name,21 * then with any fields moved after their supertypes.22 */23 public static List<Field> sortSuperTypesLast(Collection<? extends Field> unsortedFields) {24 List<Field> fields = new ArrayList<Field>(unsortedFields);25 Collections.sort(fields, compareFieldsByName);26 int i = 0;27 while (i < fields.size() - 1) {28 Field f = fields.get(i);29 Class<?> ft = f.getType();30 int newPos = i;31 for (int j = i + 1; j < fields.size(); j++) {32 Class<?> t = fields.get(j).getType();33 if (ft != t && ft.isAssignableFrom(t)) {34 newPos = j;35 }36 }37 if (newPos == i) {...

Full Screen

Full Screen

sortSuperTypesLast

Using AI Code Generation

copy

Full Screen

1import java.util.ArrayList;2import java.util.List;3import org.mockito.internal.util.reflection.SuperTypesLastSorter;4public class SortSuperTypesLast {5 public static void main(String[] args) {6 List<Class<?>> classes = new ArrayList<Class<?>>();7 classes.add(String.class);8 classes.add(Object.class);9 classes.add(Integer.class);10 classes.add(SortSuperTypesLast.class);11 classes.add(Number.class);12 classes.add(Class.class);13 classes.add(Exception.class);14 classes.add(ClassLoader.class);15 classes.add(Comparable.class);16 classes.add(Iterable.class);17 classes.add(StackTraceElement.class);18 classes.add(Throwable.class);19 classes.add(RuntimeException.class);20 classes.add(ArithmeticException.class);21 classes.add(NullPointerException.class);22 classes.add(InterruptedException.class);23 classes.add(NoSuchFieldException.class);24 classes.add(IllegalStateException.class);25 classes.add(IllegalArgumentException.class);26 classes.add(UnsupportedOperationException.class);27 classes.add(UnsupportedClassVersionError.class);28 classes.add(NoClassDefFoundError.class);29 classes.add(OutOfMemoryError.class);30 classes.add(VerifyError.class);31 classes.add(IncompatibleClassChangeError.class);32 classes.add(NoSuchMethodError.class);33 classes.add(AbstractMethodError.class);34 classes.add(NoSuchFieldError.class);35 classes.add(NoClassDefFoundError.class);36 classes.add(InternalError.class);37 classes.add(OutOfMemoryError.class);38 classes.add(StackOverflowError.class);39 classes.add(IllegalAccessError.class);40 classes.add(VerifyError.class);41 classes.add(Throwable.class);42 classes.add(Exception.class);43 classes.add(RuntimeException.class);44 classes.add(InterruptedException.class);45 classes.add(NoSuchFieldException.class);46 classes.add(IllegalStateException.class);47 classes.add(IllegalArgumentException.class);48 classes.add(UnsupportedOperationException.class);49 classes.add(UnsupportedClassVersionError.class);50 classes.add(NoClassDefFoundError.class);51 classes.add(OutOfMemoryError.class);52 classes.add(VerifyError.class);53 classes.add(IncompatibleClassChangeError.class);54 classes.add(NoSuchMethodError.class);55 classes.add(AbstractMethodError.class);56 classes.add(NoSuchFieldError.class);57 classes.add(NoClassDefFoundError.class);58 classes.add(InternalError.class);59 classes.add(OutOfMemoryError.class);60 classes.add(StackOverflowError.class);61 classes.add(IllegalAccessError.class

Full Screen

Full Screen

sortSuperTypesLast

Using AI Code Generation

copy

Full Screen

1package org.mockito.internal.util.reflection;2import java.util.ArrayList;3import java.util.List;4import org.mockito.internal.util.reflection.SuperTypesLastSorter;5public class SortSuperTypesLast {6 public static void main(String[] args) {7 List<Class<?>> list = new ArrayList<Class<?>>();8 list.add(List.class);9 list.add(ArrayList.class);10 list.add(Object.class);11 list.add(java.io.Serializable.class);12 list.add(java.io.Closeable.class);13 list.add(java.io.InputStream.class);14 list.add(java.io.OutputStream.class);15 list.add(java.io.Reader.class);16 list.add(java.io.Writer.class);17 list.add(java.lang.Comparable.class);18 list.add(java.lang.CharSequence.class);19 list.add(java.lang.Runnable.class);20 list.add(java.lang.Cloneable.class);21 list.add(java.lang.Iterable.class);22 list.add(java.lang.AutoCloseable.class);23 list.add(java.lang.reflect.AnnotatedElement.class);24 list.add(java.lang.reflect.GenericDeclaration.class);25 list.add(java.lang.reflect.Type.class);26 list.add(java.lang.reflect.TypeVariable.class);27 list.add(java.lang.reflect.WildcardType.class);28 list.add(java.lang.reflect.Member.class);29 list.add(java.lang.reflect.Executable.class);30 list.add(java.lang.reflect.Constructor.class);31 list.add(java.lang.reflect.Method.class);32 list.add(java.lang.reflect.Field.class);33 list.add(java.lang.reflect.Parameter.class);34 list.add(java.lang.reflect.ParameterizedType.class);35 list.add(java.lang.reflect.GenericArrayType.class);36 list.add(java.lang.reflect.InvocationHandler.class);37 list.add(java.lang.annotation.Annotation.class);38 list.add(java.lang.annotation.AnnotationFormatError.class);39 list.add(java.lang.annotation.AnnotationTypeMismatchException.class);40 list.add(java.lang.annotation.IncompleteAnnotationException.class);41 list.add(java.lang.annotation.Repeatable.class);42 list.add(java.lang.annotation.Target.class);43 list.add(java.lang.annotation.Retention.class);44 list.add(java.lang.annotation.RetentionPolicy.class);45 list.add(java.lang.annotation.Documented.class);46 list.add(java.lang.annotation.ElementType.class);47 list.add(java.lang.annotation.Inherited.class);48 list.add(java.lang.annotation.Native.class);49 list.add(java.lang.annotation.Overridden.class);50 list.add(java.lang.annotation.Synthesized.class);51 list.add(java.lang.annotation.AnnotationTypeMismatchException.class);52 list.add(java.lang.annotation.IncompleteAnnotationException.class);53 list.add(java.lang.annotation.Re

Full Screen

Full Screen

sortSuperTypesLast

Using AI Code Generation

copy

Full Screen

1import org.mockito.internal.util.reflection.SuperTypesLastSorter;2import org.mockito.internal.util.reflection.GenericMetadataSupport;3import java.util.ArrayList;4import java.util.List;5import java.lang.reflect.Type;6import java.lang.reflect.ParameterizedType;7public class Test {8 public static void main(String[] args) {9 SuperTypesLastSorter sorter = new SuperTypesLastSorter();10 List<Type> types = new ArrayList<Type>();11 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, List.class));12 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, ArrayList.class));13 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, List.class));14 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));15 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, List.class));16 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));17 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, ArrayList.class));18 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, List.class));19 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));20 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, List.class));21 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));22 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, ArrayList.class));23 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, List.class));24 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));25 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, List.class));26 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, ArrayList.class));27 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{String.class}, null, ArrayList.class));28 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{Integer.class}, null, List.class));29 types.add(new GenericMetadataSupport.ParameterizedTypeImpl(new Type[]{

Full Screen

Full Screen

sortSuperTypesLast

Using AI Code Generation

copy

Full Screen

1import java.lang.reflect.Method;2import java.util.Arrays;3import java.util.Comparator;4import java.util.List;5import java.util.stream.Collectors;6import org.mockito.internal.util.reflection.SuperTypesLastSorter;7public class SuperTypesLastSorterTest {8 public static void main(String[] args) {9 List<Class<?>> classes = Arrays.asList(String.class, Object.class, Integer.class);10 Comparator<Class<?>> comparator = SuperTypesLastSorter.sortSuperTypesLast();11 List<Class<?>> sortedClasses = classes.stream().sorted(comparator).collect(Collectors.toList());12 System.out.println(sortedClasses);13 }14}

Full Screen

Full Screen

sortSuperTypesLast

Using AI Code Generation

copy

Full Screen

1package org.mockito.internal.util.reflection;2import java.util.*;3import java.io.*;4import java.lang.reflect.*;5import java.lang.*;6class Main{7 public static void main(String[] args) throws Exception{8 Class<?> cls = Class.forName("org.mockito.internal.util.reflection.SuperTypesLastSorter");9 Method method = cls.getDeclaredMethod("sortSuperTypesLast", List.class);10 method.setAccessible(true);11 List<Class<?>> list = new ArrayList<Class<?>>();12 list.add(Class.forName("java.lang.Object"));13 list.add(Class.forName("java.lang.String"));14 list.add(Class.forName("java.lang.Number"));15 List<Class<?>> result = (List<Class<?>>)method.invoke(null, list);16 for(Class<?> c : result){17 System.out.println(c.getName());18 }19 }20}

Full Screen

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 Mockito automation tests on LambdaTest cloud grid

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

Most used method in SuperTypesLastSorter

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful