What is Subsytem Testing for software testing

General Tech QA/Testing . 2 years ago

  0   1   0   0   0 tuteeHUB earn credit +10 pts

5 Star Rating 5 Rating

Posted on 16 Aug 2022, this text provides information on QA/Testing related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Write Your Comments or Explanations to Help Others



Tuteehub forum answer Answers (1)


profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

What exactly is Subsystem testing">testing and is it any different from Integration Testing? Is subsystem testing">testing just testing">testing that the methods work when the parameters are passed to them?

What would be a good subsystem test for this code

package server.controller;
import server.storage.ParkedUsers;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
import server.storage.ParkingSpot;

/**
 * This is the server class that controls all data access and flow.
 * It is also responsible of creating all the parking user objects
 * once it searches them in the FIU Database.
 */
public class AccessControlServer extends Thread
{
    private static ParkedUsers garage = ParkedUsers.instance("garage.txt");
    private final int portNum;
    private PrintWriter sout = null;
    private HashMap displayConnections 
                                    = new HashMap();

    /**
     * constructor that initializes the port number variable
     * @param p integer that contains the port number 
     * to which this server will listen to
     */
    public AccessControlServer(int p)
    {
        portNum = p;
        mapConnections();
    }
    /**
     * helper method that maps the text file into the hashmap
     */
    private void mapConnections()
    {

        sout = null;
        displayConnections.put("security", sout);
        for(TreeSet t: garage.values())
            for(ParkingSpot p: t)
            {
                displayConnections.put(p.getParkingNumber(), 
                        p.getPrintWriter());
            }
    }

    @Override
    public void run()
    {
        try
        {
            startServer();
        }
        catch(IOException e)
        {
            System.out.println("Can't listen on port " + portNum);
        }
    }

    /**
     * initializes the server with the specified port number and 
     * starts listening for connections
     * @throws IOException exception thrown if there is a problem 
     * with the server
     */
    public void startServer() throws IOException
    {
        ServerSocket ss = new ServerSocket(portNum);
        while(true)
        {
            Socket s = ss.accept();
            Thread t = new Thread(new ConnectionHandler(s));
            t.start();
        }
    }    

    /**
     * method to send a message to a client
     * @param msg sends a string message to the specified client
     * @param pout the print writer connection to the client
     */
    public void sendMessage(String msg, PrintWriter pout)
    {        
        pout.println(msg);
    }

    /**
     * send the security display the status of all the parking spots
     */
    public void sendStatus()
0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community