Posts

Showing posts from February, 2022

Customer Registration Apache poi

Image
 CustomerRegistration - ApachePOI Objective: To test a web application with Selenium for basic activities. The basic selenium  concepts like Web Driver, Web Elements, Locators, Apache POI, Excel Inputs &  Table Grid are covered.  Problem Description:  An application has been designed to collect the below details of the user for address  book: Name, Age, Address, Phone Number, Email& Submit. Upon adding the valid details, the data appears in the next page with success  message in a table. Extract the data from table & display in console output Please refer below link for Application under test https://webapps.tekstac.com/CustomerRegistration/ Test Scenario: S.NO Actions to be performed             Expected Result                    1 Launch the application    Application is launched                     2                                           Enter the following data  Name : Bendict Age: 34 Addres: chennai Phone Number: 1231231233 Email: bendict@gmail.com Click the Submit

MOCA CONSOLE

Image
  MOCA Console. > The MOCA Console allows us to view information about an active MOCA Server Environment. > Before 2010.1 the MOCA Console was part of the client GUI. > For version 2010.1 and later of MOCA, the MOCA Console is accessed via a web browser. MOCA Console - Sessions. > This screen is for monitoring active sessions running on theMOCA server. > Under the "Actions" drop down on the upper left corner of the screen. • The server can be restarted. • A session thread can be interrupted for the selected row. > A refresh button is also available. MOCA Console – Sessions - Current Sessions Grid Field Name.            Description Session          The name of this session. Thread Id      The thread id that this                                   session is executing                                       session  is executing on in                           the MOCA server. Status             The status of this session.                            one of "

MOCA TASKS AND JOBS

Image
  MOCA Tasks and Jobs. > Before MOCA 2010.1, tasks and jobs had to be added to the Registry either manually or by running commands. > The only exception to this was a Client GUI screen called Schedule Agent Operations that could be used to setup a job. > For version 2010.1 and later of MOCA, tasks and jobs are both setup in the GUI. > Editing the registry is no longer required to setup a task or a job.  MOCA Tasks. > Tasks are Java processes or Java threads managed by theMOCA server process. > Tasks will continue to run once started, unless they encounter an error they can't recover from. > Information about tas k configuration is kept in the task_definition and task_env_definition tables in the database. > The Task Maintenance Screen is used to setup tasks in the GUI  MOCA Tasks - Adding a task in Task Maintenance > When setting up a task, you need to specify the following in Task Maintenance: Value.         Description Task Id      Unique Identifier fo

GROOVY EXERCISE

Image
  Exercise 1 – Adding new columns and removing rows. > For this exercise, we want to do the following completely in Groovy. • Run the "list addresses" MOCA command to build a result set. • Remove any rows from the result set where the receiving phone number  (phnnum ) and receiving fax number ( faxnum )fields are BOTH null. • For the remaining rows in the result set: > Add a new column called phn_are_cd and fax_are_cd. > Parse the area code from the phnnum and faxnum fields and load phn_are_cd  and fax_are_cd with the values. > Note: parse based on the dash – do not assume that the first 3 digits are always  the area code. > Modify the existing values for phnum and faxnum in the result set to they no  longer have the area code or the dash following the area code. > Do not forget to check if ONE of the values One possible solution: [[   import com.redprairie.moca.*;  res = new SimpleResults();  cmd = "list addresses";  res = moca.executeInline(cmd)

ADVANCED MOCA AND GROOVY

Image
 There are some more advanced features of MOCA. • We can check for null values or use the #onstack to see if a variable  is on the MOCA context stack. • onstack Check if (@adr_id#onstack != 0) {  publish data where adr = 'They gave us a address ID!' } Checking for NULL values continued... • NULL Check if (@adr_id != '' ) {  publish data where adr = 'They gave us a address ID!' } If (@adr_id is not null ) {  publish data where adr = 'They gave us a address ID!' } Joining Data using publish data. • The & can be used to join data with publish data. • Similar to using & to join result sets when executing two commands. • In the example below we are using publish data to create a two row result set. publish data where a = 1 and b = 2 and c = 5 & publish data where a = 2 This is what we get on context stack: a b c 1 2 3 2 Being careful with context. • Variables with the same name will over write previous variables. • The rows published to the cont

INSTALLING AND TESTING MOCA COMMANDS

Image
 Once a .mcmd command file is created, we compile it  using the "mbuild" command from the command prompt. • For MOCA commands involving C we must also compile  the C source file into the VARint or USRint libraries. • For MOCA commands involving Java we must compile  the Java source file into the LES.jar file. • The mbuild command will compile the .mcmd command  file and put it into the commands.mem file on the  system. • Once everything is compiled, the MOCA server will then  handle all the details concerning invoking the command. Log in using  telnet or SSH and change directory to the LES\data directory in the environment Local Syntax – running and testing command. • Ok, now I have a MOCA command ready, how do I RUN it??? • You can run MOCA commands and local syntax from Server  Command Operations in the WMS GUI. • You can run MOCA commands and local syntax from the WinMSQL  tool. • You can run MOCA commands from the MSQL command line  console. Testing and Tracing • Once our