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

Is it possible to test PS script automatically?

Community Beginner ,
Feb 26, 2020 Feb 26, 2020

Copy link to clipboard

Copied

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. (If is it possible) 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.

Views

284

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
Community Expert ,
Feb 28, 2020 Feb 28, 2020

Copy link to clipboard

Copied

Not possible

JJMack

Votes

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
Community Beginner ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

LATEST

Thanks

Votes

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