J'ai un traitement par lots Java que j'ai utilisé en C# pour exécuter le processus. Je veux avoir un test pour vérifier si le processus par lots est en cours ou non.Traitement par lots dans C#
J'ai utilisé le traitement par lots comme:
void batch_process(string process)
{
try
{
string strFilePath = Path.Combine(batch_process_path, process);
ProcessStartInfo psi = new ProcessStartInfo(strFilePath);
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.WorkingDirectory = batch_process_path;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.UseShellExecute = false;
psi.ErrorDialog = true;
}
}
Comment ce test peut être fait?
Je souhaite écrire un test élémentaire pour vérifier si le processus va démarrer ou non.
Ce code ne démarrera pas un processus. Il initialise simplement une instance de ProcessStartInfo. – PVitt
Il demande simplement comment vérifier s'il fonctionne toujours. –