• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to test photoshop script automatically - CS6

Community Beginner ,
Feb 26, 2020 Feb 26, 2020

Copy link to clipboard

Copied

Is there any possibility to write automated test for Photoshop script?

For example you write script with some UI and some user input.

You want to test if everything works right.

You can test script manually, but it is time consuming especially when your GUI is complicated and you have multiply cases to check.

 

Below is simple example:

 

 

#target photoshop
$.level = 1; // Debugging level, Level: 0 - No Break, 1 - Break, 2 - Immediate Break

var mainWindow = new Window("dialog", "Test buttons");

var buttonFoo = mainWindow.add("button", undefined, "foo");

var buttonBar = mainWindow.add("button", undefined, "bar");

buttonFoo.onClick = function(){
  alert("Fooo!");
}

buttonBar.onClick = function(){
  alert("Baar!");
}

mainWindow.show();

 

Here is gif in which I show what I want to do automatically:

ezgif.com-video-to-gif.gif

 

 

 

 

 

 

 

 

 

 

 

Requirements:

  1. I want to run test by one click.
  2. The test need to be platform independent and it should run on all photoshop versions above 13.0 (CS6).
  3. The test should be independent from user's PS layout.
  4. (If is it possible) It should not be important where buttons on UI's layout are located.

--------------------------------------------

Notes:

  • I know that photoshop is parsing code before running to find bugs, but this is not what I mean.
  • The test should mimic user behaviour (it's not important for me if I see results of test until some error or bug show up).
  • My system is Windows 10, but it would be nice if test could work on Mac also.

 

If you can answer question even partially I would be grateful.

Thanks in advance for any help.

TOPICS
SDK

Views

294

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Adobe