domingo, 23 de agosto de 2020

DICAS 3045 - WINDEV TUTORIAL 68 - MONITORAR EVOLUCAO SEUS APLICATIVOS



https://youtu.be/TkR2QbM3rAs


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 16:00 do dia 01/09/2020 

DICAS 3045 - WINDEV TUTORIAL 68 - MONITORAR EVOLUCAO SEUS APLICATIVOS TESTES
Tutoriel WINDEV : Leçon 4.13. Surveillez l'évolution de vos applications


ASSUNTOS

APRESENTANTANDO O QUE SERA ENSINADO
MOSTRANDO O PAINEL
MOSTRANDO COMO ADICIONAR OU REMOVER NO PAINEL 
MOSTRAR COMO SAIR DO MODO DE ALTERACAO DO PAINEL 
MOSTRAR QUE PODEMOS SALVAR A IMAGEM DO PAINEL 
MOSTRAR AUDIT 
EXPLICANDO TESTES AUTOMATICOS
CRIANDO UM TESTE AUTOMATICO 
COLOCANDO O NOME DO CENARIO
FAZENDO VERIFICAR COM TESTE SE TEM ALGUM ERRO 
COLOCANDO CODIGOS DENTRO DO TESTE



Video original da Franca

https://youtu.be/qMHFxGBcpM4


Playlist Windev TUTORIAL

https://youtu.be/3DshsXJ8I2M














Lesson 4.13. Monitor the evolution of your applications
This lesson will teach you the following concepts
  • What is the dashboard?
  • Automatic tests.
Lesson duration

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
The project dashboard is an essential element for managing the WINDEV projects. The project dashboard gives an overall view of the progress of a project.
The dashboard includes several elements (widgets) that give an overall view of the project status.
In this section, we will present the operations that can be performed on the dashboard elements as well as the management of automatic tests and the optimization of queries.

Answer

If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (with windows)".
A full corrected application project is also available: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)"
  • To view the project dashboard (if necessary), go to the "Project" pane, "Project" group and click Display the project dashboard.
The dashboard
Project dashboard
The project dashboard includes several Widgets. Each Widget displays various information about the project.
For example, the "Performances" Widget is used to start the performance profiler or to open the last performance report.
The "Static audit and Compilation" Widget is used to quickly see whether the project contains compilation errors. You have the ability to enable (or not) a Widget, to add one or to delete one at any time.
Automatic tests
One of the most interesting features of the dashboard is to give information about the tests that have been run on the application.
Several tests have already been run while developing our application.
The automatic tests are a category of specific tests. The automatic tests are used to automatically perform some operations on your windows. These tests are recorded as WLanguage scenarios and they can be easily modified in the code editor. Once recorded, the automatic test can be re-run as many times as necessary, to test for example the impact of a modification made to a window, a procedure, ...
Let's give it a try! We are going to create an automatic test on the edit window that was created at the beginning of this lesson.

Remark

The automatic tests can be run on the windows, procedures, classes.
  • To create an automatic test on a window, all you have to do is run the test of the window:
    1. Open the "WIN_Menu" window in the editor.
    2. On the "Automatic tests" pane, in the "Tests" group, expand "New" and select "Record a new scenario".
    3. In the window that is displayed, click "Start recording".
    4. The test of the window is run.
    5. Click the "Finding orders" tab pane.
    6. Choose the "Credit card" payment mode.
    7. Click "Find".
    8. Close the window via "Menu .. Exit" and confirm the end of application.

      Remark

      This option may not be available if you did not follow the entire tutorial. In this case, click the "x" to close the window.
    9. The recording of the automatic test has ended.
    10. The test editor proposes to save a description for the automatic test we just created. Enter the name of the automatic test: "Test for finding orders". Validate.
    11. The test editor displays the WLanguage code of the test that has just been recorded:
      WLanguage code of an automatic test
      The test is currently available and has not been run ( Available test next to the name of the test in the editor).
    12. The test can be run at any time:
      • Select the test name in the test editor.
      • In the popup menu (right click), select "Run".
    13. The test is automatically run and the test editor displays the result in the "Test results" pane (the test was successfully run in our case).
    14. Save the test if necessary ( Save or Ctrl + S)

      Remark

      The WLanguage functions used to run automatic tests are the EmulateXXX functions.
  • We are now going to perform a modification in our window and to run the test again. The modification affects the "Find" Button control. We are going to gray it.
    1. Display the "WIN_Menu" window if necessary.
    2. In the editor, click the "Finding orders" tab pane and select the "Find" Button control.
    3. Open the control description ("Description" in the popup menu).
    4. In the "UI" tab, select "Grayed".
    5. Validate the control description window.
    6. Save the window.
    7. Go back to the test editor (click the corresponding button in the open documents bar).
    8. Run the test again.
    9. The test appears again in the test editor. The "Compilation errors" tab pane reports several test errors.
    10. Redisplay the "WIN_Menu" window in the editor.
    11. Open the description of the "Find" Button control ("Description" in the popup menu).
    12. In the "UI" tab, select "Enabled".
    13. Validate the control description window.
    14. Go back to the test editor (click the corresponding button in the open documents bar).
    15. Run the test again. The test is now successfully run.
  • Another feature of the test editor is the ability to modify or add WLanguage code in the test scenarios. We are going to add code lines to check whether the Table control contains at least one record.
    1. Display the test editor if necessary (for example, double-click "TEST_Menu" in the "Tests" folder of the "Project explorer" pane).
    2. Add the following code before the line "EmulateMenu("_Menu","OPT_Exit")":
      // If the Table control contains no record
      IF WIN_Menu.TABLE_QRY_FindOrders..Count = 0 THEN
      // An error must be signaled
      TestWriteResult(twrError, ...
       "The Table control is empty after search")
      END
      Modifying the WLanguage code of an automatic test
    3. Save the test ( Save or Ctrl + S)
    4. Click the Test an element icon. The test is successfully run. Indeed, the Table control contains at least one record.
The test editor proposes several features that will not be presented in this tutorial:
  • the ability to use a set of test values.
  • the definition of input and output parameters for the test.
  • the ability to create a test library to run the test of an executable on a computer other than the development computer for example.
See Overview of automatic tests for more details about the automatic tests.
  • Close the editor of automatic tests.

DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C




DICAS 3044 - WINDEV TUTORIAL 67 - CONSUMINDO SERVICO WEBSERVICE

https://youtu.be/quiZkDpFqhw



Bom Dia/Boa Tarde/Boa Noite


Esse Ao Vivo vai estrear as 14:00 do dia 01/09/2020 

DICAS 3044 - WINDEV TUTORIAL 67 - CONSUMINDO SERVICO WEBSERVICE
Tutoriel WINDEV : Leçon 4.12. Consommer un Webservice

ASSUNTOS

EXPLICANDO O QUE É WEBSERVICE
EXPLICANDO O EXEMPLO PRATICO 
EXPLICANDO COMO FAZER A IMPORTACAO DO WEB SERVICO
IMPORTANDO O WEBSERVICE
MOSTRANDO O LOCAL ONDE FICA O WEBSERVICE
EXPLICANDO O QUE SIGNIFICA O QUE ELE TROUXE
CRIANDO O BOTAO PARA BUSCAR ESTOQUE
EXPLICANDO O CODIGO
EXECUTANDO O APLICATIVO


LINK DO WEBSERVICE


Video original da Franca

https://youtu.be/cQexMInRYbc


Playlist Windev TUTORIAL

https://youtu.be/3DshsXJ8I2M



========================


//btn em estoque
// Displays the Webservice response
// Exibe a resposta do webservice

InfoBuild("Produto de %1 em Estoque : %2",COL_Reference,ProduitEnStock(COL_Reference))











Lesson 4.12. Consuming a Webservice
This lesson will teach you the following concepts
  • Overview.
  • Importing and consuming a Webservice.
Lesson duration

Estimated time: 10 mn
Previous LessonTable of contentsNext Lesson
Overview
In most cases, a Web service is defined as an application that can be accessed via standard Internet protocols. More specifically, Web services allow several computers connected via Internet to interact.
Web services allow you to run procedures and processes on a remote Web server (.NET, SOAP or J2EE) from a client computer.
With WINDEV, these Web services can be used as client, via the SOAP protocol on HTTP (the standard Internet protocol for transferring HTML pages), with the SOAPxx, DotNetxx and J2EExx functions.
Regardless of the platform of the Web server (.NET, J2EE, ...), a Web service is accessible via the SOAP protocol.

Remark

With WINDEV, you don't even have to be an expert in this field. A wizard takes care of ("almost") everything!

Practical example

A Webservice specific to this tutorial allows you to check the different operations that can be performed on a Webservice.
When integrated to the "WD Full Application" project, this Webservice is used to interrogate a supplier database to check whether a product is available in stock using its reference.
In a first time, the Webservice will be imported into the "WD Full Application" project then it will be used in the application to check the product availability from a Product form.
Importing a Webservice
  • Close the current project if necessary. The WINDEV home page is displayed.
  • In the home page, click "Tutorial" and select "Full application (Exercise)". The project is loaded.

    Answers

    If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (With windows)".
    A full corrected application project is also available: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)"
  • Position (if necessary) on the "32-bit Windows executable" configuration: in the "Project explorer" pane, in the "Configurations" folder, double-click "Windows 32-bit executable".
  • To import a Webservice into the project:
    1. On the "Project" pane, in the "Project" group, expand "Import" and select "A Webservice".
    2. The import wizard starts. Go to the next step.
    3. Specify the address into which the WSDL description of the Webservice must be imported:
      https://examples.webdev.info/WSTUTORIALV2_WEB/awws/WSTutorialV2.awws?wsdl

      Reminder: This Webservice is used to interrogate a supplier database to check the availability (stock) of a product from its reference.
      Webservice import wizard
    4. Go to the next step. The Webservice is imported.
      Import completed
    5. Validate the information window. The imported Webservice is in the "Imported Webservices" folder of the "Project explorer" tab pane.
    6. In the "Project explorer" pane, expand the "Imported Webservices" folder.
Let's take a closer look at the information displayed in the "Project Explorer" pane:
'Project explorer' pane
The structure includes:
  • the Webservice name (WSTutorialV2 in this example),
  • the name of each function (ProductInStock in this example).
To find out how to call the Webservice, simply double-click the name of the function in the "Project explorer" pane. The code editor displays the function description, with the prototype for calling the function:
Call to function
Consuming a Webservice
In our "WD Full Application" example, the call to the Webservice will be included in the tab used to see the list of products. A button "In stock?" is used to check whether the product displayed via the Webservice is available.
  • To use the Webservice:
    1. Open the "WIN_Menu" window in the editor (double-click its name in the "Project explorer" pane, for example).
    2. Add a Button control in the "List of products" tab pane:
      • On the "Creation" pane, in the "Usual controls" group, click Creating a Button control.
      • Click below the "Modify " Button control in the window.
      • The control is automatically created.
    3. Modify the characteristics of the control ("Description" from the popup menu). This control is named "BTN_InStock" and its caption is "In stock?".
      Position of the Button control 'In stock?'
    4. Display the events associated with the control ("Code" from the popup menu).
    5. Write the following WLanguage code in the "Click BTN_InStock" event:
      // Displays the Webservice response
      InfoBuild(...
         "Number of ""%1"" products in stock: %2", ...
         COL_ReferenceProductInStock(COL_Reference))
      Let's study this code:
      • The ProductInStock function of Webservice is called. This code uses the function prototype that was displayed beforehand in the code editor.
      • The response is formatted and displayed.
    6. Close the code editor and save the window ( Save the window or Ctrl + S).
  • We are going to check the operating mode of Webservice:
    1. Run the project test ( Run project test among the quick access buttons).
    2. Click the "List of products" tab if necessary.
    3. Select any product in the Table control and click "In stock?".
      Test of Webservice
    4. Validate the information window and close the application.

DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C








Teste

Teste
teste