public ArrayList<Profile> getProfiles()
    {
        File profileDBDir = new File(TestsManager.ProfilesDBPath);
        if (profileDBDir.isDirectory() == true)
        {
            this.profiles = new ArrayList<Profile>();
            File[] profileFiles = profileDBDir.listFiles(new ProfilesFileFilter());
            for (File profileFile : profileFiles)
            {
                try {
                    Profile profile = new Profile(profileFile);
                    ArrayList<String> testsNameList = profile.getTestsNameList();
                    profile.removeAllTests();
                    for (String testName : testsNameList)
                    {
                        ITest test = null;
                        if (this.testRepository == null)
                        {
                            getTests();
                        }
                        for (ITest testIt : this.testRepository)
                        {
                            if (testIt.getName().equals(testName) == true)
                            {
                                test = testIt;
                                break;
                            }
                        }
                        if (test != null)
                        {
                            profile.add(test);
                        }
                        else
                        {
                            System.out.println("[ERROR] Test " + testName + " is listed in the profile " + profile.getName() + " but doesn't exist in the tests repository");
                        }
                    }
                    
                    this.profiles.add(profile);
                } catch (IOException ex) {
                    System.out.println("[ERROR] Creating new profile for file: " + profileFile + " failed");
                    Logger.getLogger(TestsManager.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        else
        {
            System.out.println("[ERROR] Profiles DB doesn't exist under " + profileDBDir.getAbsolutePath());
        }
        
        return this.profiles;
    }