For non technical testers Selenium IDE is the ideal environment for creating Selenium tests. Selenium IDE provides code formatter for different language and/or testing frameworks.
Choosing the right framework or scripting technique helps in maintaining lower costs. The approach of scripting used during test automation has effect on cost due to development and maintenance efforts.
Various scripting techniques are generally used when developing test automation scripts are:
- Linear : Procedural code, possibly generated by tools like Selenium IDE
- Structured: Uses control structures — for instance ‘if-else’, ‘switch’, ‘for’, ‘while’ conditions or flow control statements
- Data-driven: Data is persisted outside of tests in a database, csv files, or other mechanism
- Modularity-driven: Creation of small, independent scripts that represent modules, sections, and functions of the application-under-test
- Hybrid: Two or more of the techniques above are used
Adding Functional programming capability to IDE
If you are using selenium IDE for developing your tests, then using Apexon Selenium IDE plug-in you can record scripts that turn out to be Structured, Data-driven, and Modularity-driven or Hybrid. Plug-in provides code formatter to export recoded steps in IDE to “Apexon Test Automation Framework (ISFW)” format. In addition to code formatter for ISFW, following functional programming capability added to IDE:
-
Defining reusable steps as modules
- supports parameters
- can return value
- supports parameters
- Call defined modules in tests
- Conditional Flow control
- Looping
- Nested looping and conditional flow
Through Apexon plug-in you can apply different approaches while recording using selenium IDE, for instance
- Scripts generated by Selenium IDE using record facility be the linear
- By use of control structures commands – typically ‘if’, ‘else’, ‘elseif’, ‘while‘ conditions/ statements provided by Apexon plug-in will make scripts Structured
- Creation of small, independent modules of the application-under-test using ‘defineModule‘ command provided by Apexon plug-in be useful in developing Modularity-driven test
- Call command provided by Apexon plug-in be useful call defined modules in test
- Define module with parameters and use of data-provider will make script Data-driven
Thus three steps for non technical users are:
- Record using Selenium IDE
- Edit as per requirements
- Export test case as “ISFW” format from IDE.
You can get more detail about plug-in usage in next blog “Using Apexon Selenium IDE Plug-in”