All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.katalon.platform.api.extension.TestCaseIntegrationViewDescription Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
package com.katalon.platform.api.extension;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;

import com.katalon.platform.api.model.Integration;
import com.katalon.platform.api.model.ProjectEntity;
import com.katalon.platform.api.model.TestCaseEntity;

/**
 * TestCaseIntegrationViewDescription is the interface of
 * com.katalon.platform.api.extension.testCaseIntegrationViewDescription
 * extension point that allows client plugins can add a view in Test Case integration tab.
 * 

* Register in the plugin.xml like this: * *

 * {@code
 * 
 *     
 * 
 * }
 * 
* * The implementationClass is the full qualified name of the class that implements * TestCaseIntegrationViewDescription. * * @since 1.0.4 * */ public interface TestCaseIntegrationViewDescription { /** * Id of this extension point * * @since 1.0.4 */ String EXTENSION_POINT_ID = "com.katalon.platform.api.extension.testCaseIntegrationViewDescription"; /** * @param projectEntity the working project * @return true if this view is visible. Otherwise, false. * @since 1.0.4 */ default boolean isEnabled(ProjectEntity projectEntity) { return true; } /** * @return Name of integration view * @since 1.0.4 */ String getName(); /** * @return clazz that implements TestCaseIntegrationView * @since 1.0.4 */ Class getTestCaseIntegrationView(); /** * Describes how the integration view is displayed. * * @since 1.0.4 */ public interface TestCaseIntegrationView { /** * Creates the integration views. * * @param parent parent view of the integration view * @param partActionService utility service that helps to interact with Test Case view. * @param testCase the working test case * @return the created integration view * @since 1.0.4 */ Control onCreateView(Composite parent, PartActionService partActionService, TestCaseEntity testCase); /** * @return Returns the current editing integration before KS performs saving process. This method will be called * if needsSaving returns true. * * @since 1.0.7 */ default Integration getIntegrationBeforeSaving() { return null; } /** * Indicates the current integration view that needs save the integration information. This method is called * after users hit Save, or Save All button. *

* If this method returns true, Katalon Studio will invoke #getIntegrationBeforeSaving() to get new integration information. * * @return true if the current editing integration need to be saved. Otherwise, false. * * @since 1.0.7 */ default boolean needsSaving() { return false; } /** * The success callback function after the current editing test case successfully saved. * * @param updatedTestCase the updated TestCaseEntity * * @since 1.0.8 */ default void onSaveSuccess(TestCaseEntity updatedTestCase) { } /** * The failure callback function after the current editing test case was unable to save. * * @param exception the root cause failure * * @since 1.0.8 */ default void onSaveFailure(Exception exception) { } } /** * A utility that helps the integration view can interact with Test Case view. * * @since 1.0.4 */ public interface PartActionService { /** * Marks the test case view is able to save. * * @since 1.0.4 */ void markDirty(); /** * Checks the test case view is able to save or not. * * @return true if test case view needs to save. Otherwise, false. * @since 1.0.4 */ boolean isDirty(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy