A
A
Andrey2018-01-12 12:58:23
Vue.js
Andrey, 2018-01-12 12:58:23

How to test the application, methods and approaches?

I need to test an application written in c / c ++, what ways are there for this?
Application Description: The program communicates via sockets. Mostly receives data, but can also send. The received data is parsed and shown to the user in a form convenient for him. By pressing the buttons, the program sends data. Written under Linux (since Linux libraries are used for work), but you can also run it under Windows (a small part of the functionality will be inactive).
What you need from testing:
ui:
1) check the correct display (which was parsed and shown to the user) of the data that came to the socket
2) check the correct order of writing to the database
3) check that the data that is expected from the program goes to the network
code:
1) checking the "correctness / conformity" of the returned data by certain functions
2) checking the raw data that came to the socket
3) checking for used memory (how much is used, was used for the entire cycle of the application's existence)
Wishlist from testing:
1) writing code for tests in python or java
2) testing the application not with each assembly of the application, but only on request
3) the ability to perform not all tests, but only a part. If possible, test only
those components whose code has changed.
I am not familiar with testing, and then at the level of asserts and ifs. But apparently I need something more ambitious)))
Please tell me in which direction to dig to test this program. What tools/frameworks to use. What are the good courses, online resources, books and articles from which you can get the necessary information.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
origami1024, 2019-10-30
@vessels

Three options:
1. Send the event to the father, the father will send it to the grandfather, so up to the common ancestor, the common ancestor will send props to his heirs.
2. Use Vuex, change the state there so that the other element is simply updated when the states affecting it change
3. Communicate directly via root
Component1: Component2:

mounted() {
  this.$root.$on('eventing', data => {
    console.log(data);
  });
}

I
Igor, 2019-10-30
@IgorPI

To catch events in the parent, it is enough

child
<template>
  <div @click="$emit('click')"></div>
</template>

parent
<template>
  <div class="warp">
    <item @click="" />
    <item @click="" />
    <item @click="" />
  </div>
</template>

S
Stanislav Makarov, 2018-01-12
@Nipheris

checking the "correctness/correspondence" of the returned data by certain functions

This is unit testing, see Catch .
Google "memory profiler" (e.g. valgrind.org/docs/manual/ms-manual.html ). I usually profile in the Studio, I have not yet come across the automation of this process, but I think it is possible.
Here you need to lock the client to the database and the network socket / stream (depending on how it's all implemented, it's hard to advise without details), and instead of actually sending data / writing to the database, do the checks you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question